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

stdlib wastes time being rebuilt on every minimizer run #98

Open
JasonGross opened this issue Jan 27, 2025 · 4 comments
Open

stdlib wastes time being rebuilt on every minimizer run #98

JasonGross opened this issue Jan 27, 2025 · 4 comments

Comments

@JasonGross
Copy link
Member

The bug minimizer needs to wrap coqc in order to extract information about the build. This means that the hashes are different in

rocq=$(command -v rocq)
# NB on cygwin "$rocq" is a cygwin path (/foo/bar)
# but reading files from hash.exe needs windows paths (C:/cygwin/foo/bar)
# we avoid the problem by going through stdin
rocqhash=$(dune exec --root "$(dirname "$0")"/.. -- dev/tools/hash.exe < "$rocq")
rm -rf .wrappers
mkdir .wrappers
cat > .wrappers/coqc <<EOF
#!/bin/sh
# hash = $rocqhash
exec rocq c "\$@"
EOF

which I guess has dune rebuild all files. What's the justification for doing this?

@SkySkimmer
Copy link
Contributor

It is correct to rebuild when coqc changes.

@JasonGross
Copy link
Member Author

Perhaps that is true in general, but it should be possible (and relatively easy, without needing to know the details of the build system of any given development) to bypass the rebuild. I don't think it's reasonable to force a rebuild of a development and all its dependencies when testing out a fix. What workflow is this serving?

Perhaps actually the issue is that Coq's CI targets should not be using this wrapper?

@JasonGross
Copy link
Member Author

I'm going to reopen for now this so it doesn't get lost, feel free to transfer it to coq/coq or ask me to do that

@JasonGross JasonGross reopened this Jan 27, 2025
@SkySkimmer
Copy link
Contributor

We can avoid the rebuild by not doing dune build, ie coq/coq#19925

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants