Skip to content
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

hbenl.vscode-test-explorer, ms-python.python : missing "out" folder #29

Closed
marcdumais-work opened this issue May 11, 2020 · 7 comments · Fixed by #36
Closed

hbenl.vscode-test-explorer, ms-python.python : missing "out" folder #29

marcdumais-work opened this issue May 11, 2020 · 7 comments · Fixed by #36

Comments

@marcdumais-work
Copy link
Contributor

marcdumais-work commented May 11, 2020

https://open-vsx.org/extension/hbenl/vscode-test-explorer

Normally after build it should have a out folder that contains the "executables" (.js files) for that extension, that gets packaged in the .vsix, but that's missing from what's published on open vsx.

Building it locally, I was able to obtain that folder with these commands:

$> npm install 
$> npm run build

I see the npm install is covered. I do not see that npm run build is called?

If this is unexpected to be required, maybe a solution would be to support a field in extensions.json where one can add extra required command(s) to run to correctly build some extensions that need a bit more of a custom procedure, before the script proceeds to that packaging/publishing phase?

update:
for ms-python.python I was able to update the out folder like so:

$> npm install
$> npm run package
@jankeromnes
Copy link
Collaborator

Good catch, thanks @marcdumais-work.

@spoenemann Is npm run build or yarn run build typically a required step before publishing an extension?

If so, should it always be done explicitly before ovsx publish, or should ovsx publish take care of that?

@spoenemann
Copy link
Collaborator

No, not always. I think most extensions do that as part of the prepare step (i.e. during yarn install) or the vscode:prepublish step.

@marcdumais-work
Copy link
Contributor Author

No, not always. I think most extensions do that as part of the prepare step (i.e. during yarn install) or the vscode:prepublish step.

That's my experience as well. But since VS Code extensions are self-published, so long as the author knows how to get to a working package, it works.

BTW, I think the same or similar thing was happening with extension node-debug: #28 . That one as well I was able to get a working .vsix, IIRC by manually calling npm install; npm build.

@marcdumais-work
Copy link
Contributor Author

marcdumais-work commented Jun 3, 2020

I think ms-python.python has the same problem:

root INFO [hosted-plugin: 21414] PLUGIN_HOST(21414): PluginManagerExtImpl/loadPlugin(/tmp/vscode-unpacked/vscode-builtin-python.vsix/extension/dist/pythonMain)
root INFO [hosted-plugin: 21414] PLUGIN_HOST(21414): PluginManagerExtImpl/loadPlugin(/home/<user>/.<prod>/extensions/ms-python.python-2020.2.3/extension/out/client/extension)
root ERROR [hosted-plugin: 21414] { Error: Cannot find module '/home/<user>/.<prod>/extensions/ms-python.python-2020.2.3/extension/out/client/extension'

The extension exists at that path, except from out. Another clue: the extension is ~40 KB in size on open-vsx.org vs ~40 MB on GH release: https://github.com/microsoft/vscode-python/releases

@marcdumais-work marcdumais-work changed the title hbenl.vscode-test-explorer : missing "out" folder hbenl.vscode-test-explorer, ms-python.python : missing "out" folder Jun 3, 2020
@jankeromnes
Copy link
Collaborator

jankeromnes commented Jun 5, 2020

Fixed in #36 by adding an extra prepublish option to the extension-publishing specification here.

Also, I've added back ms-python.python, because the version on https://open-vsx.org is outdated (and broken due to missing out dir), and the namespace owner hasn't published anything yet.

I can also add back node-debug and node-debug2, but I'm not clear which of these are built-in (i.e. already published by your script @marcdumais-work).

@jankeromnes
Copy link
Collaborator

jankeromnes commented Jun 5, 2020

I can also add back node-debug and node-debug2, but I'm not clear which of these are built-in

Ok, I checked https://github.com/eclipse-theia/theia/blob/master/package.json again, and found that ms-python.python is not built-in (i.e. I can add it back here), but node-debug and node-debug2 are built-in (i.e. your script is already publishing them).

@marcdumais-work
Copy link
Contributor Author

marcdumais-work commented Jun 5, 2020

node-debug and node-debug2 are built-in (i.e. your script is already publishing them).

Nope. They are fetched by vscode's build and not packaged as builtin extensions AFAIK, unless maybe they're burred inside one of the builtin. So far we have a fork for these repos on theia-ide org and build/publish them (to GH Releases) manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants