-
Notifications
You must be signed in to change notification settings - Fork 26
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
Include serialport bindings in package #112
Include serialport bindings in package #112
Conversation
Can one of the admins verify this patch? |
It looks like it may end up dragging other dependencies along with it, since removing it from the bundling tree cuts those out, as well. That would be unfortunate, as we'd be back to bundling hundreds of files for fear of missing some transitive dependency. I'll take a closer look. |
Relevant here: prebuild/node-gyp-build#53. |
Thanks @colin-grant-work for your efforts so far! I tried out what you have and I see what you mean about it needing to pull in more and more. FTR this is the error I get with the current version of the PR:
IIUC correctly it is complaining about |
@jonahgraham, I think my inclination at this point is to significantly scale back the ambition of #96 and just replace the bundling stage for the webview code with ESBuild, leaving the rest of the build more or less as it was. I think there's no way around including the whole dependency tree of Unless you think I'm being too pessimistic or you see a way around the dynamic import problems that the node-gyp-build bindings introduce, I'll update this PR to remove most of the bundling in the morning. |
e34c311
to
c0f7455
Compare
@asimgunes, in view of the problems raised in #111, this PR reverts many of the changes in #96 in a way that should be friendly to your use case. Relative to #107, it has most of what you've brought in, apart from separate |
c0f7455
to
daa75d4
Compare
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.
Hi, this request and PR #107 contains conflicted changes in the esbuild script. we might consider a change priority and rebase the changes accordingly.
.vscodeignore
Outdated
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.
Just a subjective comment: I'd consider using the old format where first excluding everything and including what is necessary here, it sound you have more control what is in the output. Only exclude what is not necessary results easily forgotton development files in an environment where multiple developers contribute.
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.
I agree, but to be clear about the effect here, I've reverted back to (close) to the state before #96. Given that we now want to include many node_modules
, I'd need to experiment to determine whether something like
*/
!node_modules/
would override VSCE's default behavior in which it resolves which runtime dependencies from node_modules
, whereas we know that the older file is more or less correct. I'm happy to do that experimentation, but as a first cut, the reversion seemed like a safe option.
daa75d4
to
7d6cb05
Compare
Hi @colin-grant-work, I just added ESM along with the CJS just for the best practice and general use. Only CJS is enough for my particular scenario. And happy to hear your comment if you suggest to skip ESM for now. |
7d6cb05
to
199dabd
Compare
@colin-grant-work / @asimgunes - I don't have strong opinions on how we get this to work, you two have much more domain knowledge and understanding than I do. I would just like to get something working asap as the deployed version of this extension on open-vsx is currently broken. Perhaps we revert #96 (and the related changes since) so we can publish a new working version and then proceed with the various ideas here? |
@jonahgraham, I'd say in its current form, this is very close to a reversion of #96, and if you can confirm that it works on target debug cases, I think we could move forward with this and clarify the details in #107. I've tested target debugging locally, but I'm not sure under exactly what conditions the serialports come into play. |
I built this branch and can start target debug and connect the serial port. @asimgunes can you confirm this is ok to go as is now so I can get a working version on open-vsx and then we can get #107 resolved after? |
Hi @jonahgraham, It is ok for me to move this request first since we have an active problem, I can rebase the #107 after the merge of this request. |
Hi @jonahgraham , @colin-grant-work But I forgot to mention, I still insist not renaming the MemoryBrowser bundle name here, if I am not missing anything, we do not need this renaming since the other output files are under other folders and I am not expecting any file conflict at the output. Also fine, if you want this renaming for preventing future confusion. |
I've taken the renaming out of the current version - there should be no changes to |
I think ts compiler should generate the MemoryBrowser under |
Yes, I agree. |
Then, do you think there could be still a conflict if not renaming? |
@asimgunes, I'm not sure we're on the same page. I believe I've made the changes you've requested so that there are no changes in name to files that were being generated before this PR. There are now two Have I misunderstood your initial request, and is there a change you'd like to see to the current code? |
@colin-grant-work, ok I did not realise the code change. It seems fine now. Thanks. |
@jonahgraham, it looks like we're agreed on the current state. |
OK. I am merging this and will tag a 0.0.107 version soon that will be published overnight. |
This PR reduces the effects of #96 to the following:
dist
rather thanout
. This is so that any adjustments made since Proposal: Package Extension #96 continue to apply. It would easy to move back toout
if that is preferred.In particular:
vsce
's resolution of runtime depndencies to keep all of the node modules that are relevant at runtime.tsc
to transpile into thedist
folder, with.d.ts
files in the expected 1:1 relationship with transpiled.js
files.Functionally, bundling worked fine for three of the four things to which it was applied, the extension code: the webview code, and the CDT-GDB Adapter's
debugAdapter
entry point. It failed fortargetDebugAdapter
because it depends on a package that depends on a package that requires specific file structure layout. Bundling the extension and thedebugAdapter
would bring some performance benefits, but they would be fairly negligible.To Test
vsce ls
and confirm that the kitchen sink is back (but that nothing from thedist
folder we don't want has crept in).Fixes #111