-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Automate building packages with different feature sets #309
base: master
Are you sure you want to change the base?
Conversation
7781373
to
0c99bd2
Compare
Generating no-compat files ; simd + non-deterministic working locally ; package lock missing may be a problem for ci, not sure
…e removed in the future
0c99bd2
to
6e3911d
Compare
It was brought up that a reader may infer that That's wrong: the additional feature |
name: pkg ${{ matrix.os }} | ||
name: pkg ubuntu-latest |
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.
todo : re integrate check on mac
Current status
This pr adds a rust project to generate the current
rapier2d
andrapier3d
folders, which will be removed once this PR is stable.no-compat builds
When running
./prepare_builds/prepare_all_projects.sh
, you should see multiple folders created under./builds
:Run
./prepare_builds/build_all_projects.sh
to build them. Each package will be in their respectivepkg
folder.CI has been tested on a different branch on my repository .
Differences with master
It's interesting to see a few typos which have gone through manual copying, this PR helps with detecting and fixing those:
Differences for generated rapier2d with current master version:
Differences for generated rapier3d with current master version:
compat builds
When running
npm run build
inrapier-compat
directory, a subdirectorybuilds
for each feature set will be created to fit all built files into each. A finalpkg
folder is created in each of those directory.gen2d
andgen2d
is similar for each folders, so it is generated once, then copied into each folders. the original is not removed to ease debugging and understanding each steps.CI has been tested on a different branch on my repository
Adoption strategy
We want to move away from
enhanced-determinism
(cross-platform) to be the default behaviour, as it's a more advanced feature, and it would mean "negative features" packages being created.This PR changes
rapier2d
andrapier3d
packages behaviour to be now deterministic locally (opposed to cross-platform), this PR should be blocked until we do at least a release of current versions, warning users about this upcoming change, so they can prepare to migrate. Changelog should be clear about that.Current limitations:
npm ci
npm ci
is difficult to use becausepackage-lock.json
should be existing before calling it.npm i
workspace
It's practical to use workspace to share options in the different rust projects (we've been using codegen unit).
I went with using more project names, but changing hierarchy is also a solid option: I concatenated additional features to the name, but we may want to customize it further through an explicit name or a hash when generating projects, let's see.
rapier-compat hardcoded projects list
Current rollup hardcodes all features, it would be cleaner to list all packages in runtime, from previous build step or with a config file shared with rust wasm builds.
Error handling
Scripts should stop on an error, or report all errors at the end. Currently some error may occur and be lost in the noise.
Other notes