-
Notifications
You must be signed in to change notification settings - Fork 72
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 issue with build using flake system in issue #747 #754
Conversation
- Make the project build using flake - Revert to version of coq that builds without dune version error - Update flake.nix
Thanks! Is there a way to run this tool in CI and check that the .nix is up to date wrt the yarn one? I'm not a nix user, neither is Romain AFAIK, so CI better be rock solid on nix, or we won't notice these issues timely. |
Yeah, using the following command will just create a file called nix-shell -p yarn2nix --run "yarn2nix > new_yarn.nix" Then, you could compare hashes with the committed file ( Alternatively, you could overwrite the |
@@ -731,7 +731,6 @@ | |||
"start:search-ui": "cd search-ui && yarn run start", | |||
"build:search-ui": "cd search-ui && yarn run build", | |||
"build:dev:search-ui": "cd search-ui && yarn run build:dev", | |||
"vscode:prepublish": "yarn run package", |
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.
Removing this causes the publish-extension CI job to fail. Maybe we can just add a yarn run package
step to the CI, before the relevant job ?
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.
Thanks again for you contribution :-)
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.
Maybe we can just add a
yarn run package
step to the CI
Yeah, that's kind of what I was envisioning. Seems like that's the only reason CI failed
Took the liberty of attempting a fix |
Argh, fixed the wrong file... Also realised retrospectively that it would have been more polite to ask for permission before pushing to the main branch of your fork. Would you mind if I push the fix on the right file @redanaheim ? |
@rtetley No yeah it's fine go ahead, I didn't even know you could do that lol |
Haha yeah, you can opt out of it when you create the PR afaik |
Since the vscode:prepublish action was deleted, we do a yarn run package before launching the relevant actions
@redanaheim sounds good ! Please do :-) I'm really not that much of a nix expert... |
Okay finally looks like this should work. One little nitpick: the PIN_COQ needs to track the master branch of coq, it allows for coq developers to do PRs which keep the language server up to date with the latest coq api. What is the issue with the old pin ? It was probably currently not up to date. |
@rtetley There is no issue, I changed it on my own fork to be the latest version that builds with flakes. I can revert it back to the version currently on main if you'd like. |
cd to correct directories this time "diff" exits with exit code 1 iff the files aren't the same
Ah okay cool ! Nah that sounds fine ! Thanks ! |
See issue #747
Overview of changes:
vscode:prepublish
script frompackage.json
because it causes the flake build script to attempt (and fail) to install the yarn dependencies using yarn when building the.vsix
yarn.nix
files generated usingyarn2nix
that allow building the yarn dependencies using nixnativeBuildInputs
for each version ofvscoq-language-server
so thatcoqc
is accessible during the language server build processbuildPhase
ofvscoq-client
: first build UI using scripts inpackage.json
through yarn, thenwebpack
the whole thing,vsce package
, then move the.vsix
to the bin folder.One possible problem: I changed the commit the
coq-master
dependency is derived from, which (according to the comment) may break something in the CI workflow. I'm not sure what the pinned version is, but the latest commits oncoq/coq
don't build with the flake system.These changes were tested on aarch64-darwin (MacOS 14.1, nix 2.20.3) and aarch64-linux (nixOS, nix 2.18.1).