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

Better dev experience for JS generated file hashes #7975

Closed
wants to merge 1 commit into from

Conversation

jprochazk
Copy link
Member

@jprochazk jprochazk commented Nov 1, 2024

What

  • The hash check no longer runs during normal development (pixi run js-build-*, more generally appending :no-check to the npm build commands will do the same)
  • Added more info to the error that is emitted when the hashes don't match
  • Added a pixi task to update the hashes: pixi run js-update-hashes.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

To run all checks from main, comment on the PR with @rerun-bot full-check.

@jprochazk jprochazk added 🧑‍💻 dev experience developer experience (excluding CI) exclude from changelog PRs with this won't show up in CHANGELOG.md labels Nov 1, 2024
Copy link

github-actions bot commented Nov 1, 2024

Deployed docs

Commit Link
798b815 https://landing-nklqphu09-rerun.vercel.app/docs

@@ -12,7 +12,8 @@
],
"scripts": {
"build:types": "tsc --noEmit && dts-buddy",
"build": "npm run build:types"
"build": "npm run build:types",
"build:no-check": "npm run build"
Copy link
Member Author

Choose a reason for hiding this comment

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

This does the same thing as build, it's only here for compatibility with running the same command across all packages in the yarn workspace (yarn --cwd rerun_js workspaces run build:no-check would fail on the web-viewer-react package otherwise)

Copy link
Member

Choose a reason for hiding this comment

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

That's a great comment - it should be comited :)

Copy link
Member Author

@jprochazk jprochazk Nov 2, 2024

Choose a reason for hiding this comment

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

yes, it would be nice if it was possible to put comments in JSON. i'm not sure where else to put it

Copy link
Member

Choose a reason for hiding this comment

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

oh right 🤦 God damn JSON

"js-install",
] }

js-update-hashes = { cmd = "node rerun_js/web-viewer/build-wasm.mjs --update-hashes", depends_on = [
Copy link
Member

Choose a reason for hiding this comment

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

docstring! Update what hashes? Why and when would they need updating?

@@ -12,7 +12,8 @@
],
"scripts": {
"build:types": "tsc --noEmit && dts-buddy",
"build": "npm run build:types"
"build": "npm run build:types",
"build:no-check": "npm run build"
Copy link
Member

Choose a reason for hiding this comment

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

That's a great comment - it should be comited :)

@jprochazk
Copy link
Member Author

Honestly, I think my solution to this problem (wasm-bindgen output changing) is bad and we need something else. I totally forgot how much of a PITA it was when we were committing the codegen source hash.

@jprochazk jprochazk closed this Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍💻 dev experience developer experience (excluding CI) exclude from changelog PRs with this won't show up in CHANGELOG.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants