-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve names of .node files #768
base: main
Are you sure you want to change the base?
Conversation
binding.gyp
Outdated
@@ -32,7 +32,7 @@ | |||
{ | |||
'target_name': 'conpty', | |||
'sources' : [ | |||
'src/win/conpty.cc', | |||
'src/win/conpty_backend.cc', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it target_name
we need to change as well to change the .node file, then an update here is needed too:
node-pty/src/windowsPtyAgent.ts
Lines 64 to 93 in 467cea0
if (!conptyNative) { | |
try { | |
conptyNative = require('../build/Release/conpty.node'); | |
} catch (outerError) { | |
try { | |
conptyNative = require('../build/Debug/conpty.node'); | |
} catch (innerError) { | |
console.error('innerError', innerError); | |
// Re-throw the exception from the Release require if the Debug require fails as well | |
throw outerError; | |
} | |
} | |
} | |
} else { | |
if (!winptyNative) { | |
try { | |
winptyNative = require('../build/Release/pty.node'); | |
} catch (outerError) { | |
try { | |
winptyNative = require('../build/Debug/pty.node'); | |
} catch (innerError) { | |
console.error('innerError', innerError); | |
// Re-throw the exception from the Release require if the Debug require fails as well | |
throw outerError; | |
} | |
} | |
} | |
} | |
this._ptyNative = this._useConpty ? conptyNative : winptyNative; | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I will update it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just need to figure out why CI is failing now. See the error at https://dev.azure.com/vscode/node-pty/_build/results?buildId=147363&view=logs&j=0bc77094-9fcd-5c38-f6e4-27d2ae131589&t=2917e7a9-bb9d-585b-890e-1ad69b6f3f65&l=976
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name should be updated in
node-pty/scripts/post-install.js
Lines 10 to 11 in 090384f
path.join(RELEASE_DIR, 'conpty.node'), | |
path.join(RELEASE_DIR, 'conpty.pdb'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @deepak1556
I have updated the post-install script, but it is still not working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check #768 (comment)
Hello @Tyriar |
That error means that the expected compile |
I will try to look at it more |
binding.gyp
Outdated
'sources' : [ | ||
'src/win/conpty.cc', | ||
'src/win/conpty_backend.cc', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing the target name is sufficient to achieve the required result, lets keep the source file names unchanged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay
binding.gyp
Outdated
@@ -58,7 +58,7 @@ | |||
'deps/winpty/src/winpty.gyp:winpty', | |||
], | |||
'sources' : [ | |||
'src/win/winpty.cc', | |||
'src/win/winpty_backend.cc', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required for the scope of this PR, lets revert this.
scripts/post-install.js
Outdated
const destFolder = path.join(RELEASE_DIR, 'conpty'); | ||
const destFolder = path.join(RELEASE_DIR, 'conpty_backend'); | ||
fs.mkdirSync(destFolder, { recursive: true }); | ||
for (const file of ['conpty.dll', 'OpenConsole.exe']) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should not be renamed, they are prebuilt binaries from conpty library.
There is one another place to update Line 171 in bfbd943
|
fix #701