-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
Move JS directory inside reactpy to fix broken source distributions #1183
Move JS directory inside reactpy to fix broken source distributions #1183
Conversation
This breaking change is needed to fix being unable to install reactpy from source distributions.
Wheel generation and installation is where building the client should happen
.gitignore would cause them to be missing from the wheel otherwise
Your original comment mentions that a symlink has issues, but could a hard link work instead of moving the source folder? |
@Archmonger As far as I know, most operating systems don't support hard linking directories. You could hard link all the individual source files instead, but it seems that Git doesn't distinguish hard links from normal files so they can't be preserved in version control. |
I'd say we hard link all files recursively, and then have a Burying the JavaScript source within the Python source feels awkward to me for something that's fundamentally just a build tools problem. |
That has similar issues to As for avoiding intermixed Python and JavaScript source directories, I think the difficulties in configuring the build system stems from it not sufficiently supporting file structures that go past the root of pyproject.toml, which is what determines the sdist archive root. Given that reactpy is the main package of the project, an alternative to moving the sources around could be placing |
I've discussed with @rmorshea in the past of removing Hatch from this repo's workflow. There wasn't any issues with the old But the monorepo never happened, so this feels like added complexity and bugs for little gain. |
Is there any downside to just not shipping an sdist, or at least delaying this change? I can work on switching back to a |
That's a fair approach too. Based on the packaging guide, the risks of not publishing an sdist would be:
The first point matters less to reactpy since it has a pure-python wheel, but if some future change makes the build process dependent on system architecture, it becomes extra important for reactpy (or possibly a third-party) to provide wheels for every system architecture that its users might have, perhaps with a tool like cibuildwheel. The second point depends on how easily users can access the repository, which I think is probably going to be fine for the forseeable future. Another way to fix the sdist could be to update tasks.py so it hard links the files before installation, and also include some "relink" command to repeat the same hard linking before proceeding with building/publishing, combining the pyproject.toml changes and @Archmonger's suggestion together. The limitations change from having the source code intermixed in version control to a more complicated, but still automated build process, which seems like a better tradeoff in regards to the monorepo structure. Either way, I don't disagree with dropping the sdist or going back to setuptools. |
@thegamecracks , I already told they will not accept others PR, Just a deadly project this is ... |
@kumaraguru1735 right now Ryan is the only one with permission to approve PRs for this repo, but he hasn't had time to do any OSS. It's okay to criticize things moving slow, but the toxicity isn't appreciated. |
@Archmonger , why not you don't have permission for PR ? You are team of Reactpy wright ? |
@Archmonger , if he fails to give permission, I think you are not part of the game! I hope you will create seperate repo and put on own ideas and Maintain it |
@Archmonger has been granted admin privileges now. |
I'm working on a solution to this that won't involve moving the directory. As per @thegamecracks's suggestion just linking the JS directory and including it as an sdist-only artifact should be sufficient. |
@rmorshea I think you might also have to set me as an organization owner. I can't change workflow settings, which prevents me from changing required workflows. |
Closing this since Ryan is pushing for #1191 |
Issues
#1180
Solution
This PR moves the JS directory inside reactpy and tweaks the build process so hatch can produce source distributions that contain the JS client's source code necessary for end users to build the package.
Due to this being a major change in the project structure, developers will need to adapt their workflows to the new location of
js/
.Checklist
changelog.rst
has been updated with any significant changes.