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

fix support for projects with different python/labextension_name #229

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

telamonian
Copy link
Member

I just ran into another breaking bug in the new hatch toml. This is hidden if the names of the project's python and js packages are exactly the same. However, when I made a project with python package jupyterlab_x_y and js package jupyterlab-x-y I ran into pathing hell. Ultimately the issue in this case is that the javascript machinery that loads the extension bundle files expect all of the files to be under a dir named after the js package (eg share/jupyter/labextensions/jupyterlab-x-y), but the toml template instead places the bundle files under a dir named after the python package (eg share/jupyter/labextensions/jupyterlab_x_y). This leads to a fatal NOT-FOUND error on attempted extension bundle load. This PR fixes that

I just ran into another breaking bug in the new hatch toml. This is hidden if the names of the project's python and js packages are exactly the same. However, when I made a project with python package `jupyterlab_x_y` and js package `jupyterlab-x-y` I ran into pathing hell. Ultimately the issue in this case is that the javascript machinery that loads the extension bundle files expect all of the files to be under a dir named after the js package (eg `share/jupyter/labextensions/jupyterlab-x-y`), but the toml template instead places the bundle files under a dir named after the python package (eg `share/jupyter/labextensions/jupyterlab_x_y`). This leads to a fatal NOT-FOUND error on attempted extension bundle load. This PR fixes that
@telamonian telamonian changed the title fix support for projects with different python'/'labextension_name fix support for projects with different python/labextension_name Sep 9, 2022
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @telamonian

One of the test is using my-labextension and my_labextension and did not catch this. Could you provide more details on when and where is the error emitted so we can make the CI test more robust?

@jtpio
Copy link
Member

jtpio commented Sep 27, 2022

Thanks, merging since it fixes the original issue.

Opened #232 to track follow-up CI improvements.

@jtpio jtpio merged commit 468cc0b into 3.0 Sep 27, 2022
@jtpio jtpio deleted the fix-different-python-js-names branch September 27, 2022 07:24
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 this pull request may close these issues.

3 participants