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

Remove postinstall script #6207

Merged
merged 3 commits into from
Oct 25, 2023
Merged

Remove postinstall script #6207

merged 3 commits into from
Oct 25, 2023

Conversation

elle-j
Copy link
Contributor

@elle-j elle-j commented Oct 20, 2023

What, How & Why?

Our bindgen:generate:typescript and bindgen:generate:wrappers scripts rely on the realm-bindgen command. For Bindgen's node dependencies in Core to be installed correctly and allow for the realm-bindgen command to be run, npm install needs to be run after git submodule update --init --recursive (which was previously in our postinstall script).

Replacing the postinstall with a preinstall does not fix this issue.

This PR removes the postinstall script all together, moving the responsibility of fetching the submodule to the developer:

git submodule update --init --recursive
npm install

# Now you can e.g. run tests (which will build etc. automatically).
npm run test --workspace realm # Unit tests

☑️ ToDos

--

@coveralls-official
Copy link

coveralls-official bot commented Oct 20, 2023

Coverage Status

coverage: 85.397%. remained the same when pulling 021bfe9 on lj/bindgen-postinstall into eca95b6 on main.

Copy link
Member

@kraenhansen kraenhansen left a comment

Choose a reason for hiding this comment

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

Any docs we need to update in https://github.com/realm/realm-js/tree/main/contrib as a part of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kraenhansen, regarding your comment if any of our contrib files also needs updating. In general I think we need to take a look at updating a lot of information when it comes to building and contributing (after bindgen was merged into main).

So unsure if any single update to those files with regard to this PR would be helpful, perhaps adding an npm install after this line.

@elle-j elle-j merged commit 1f5312a into main Oct 25, 2023
29 checks passed
@elle-j elle-j deleted the lj/bindgen-postinstall branch October 25, 2023 11:29
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants