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

'dune subst' has been disabled in this project #496

Open
talex5 opened this issue Dec 20, 2024 · 1 comment
Open

'dune subst' has been disabled in this project #496

talex5 opened this issue Dec 20, 2024 · 1 comment

Comments

@talex5
Copy link

talex5 commented Dec 20, 2024

dune-release fails with:

$ dune-release
[-] Building source archive
File "dune-project", line 4, characters 7-15:
4 | (subst disabled)
           ^^^^^^^^
Error: 'dune subst' has been disabled in this project. Any use of it is
forbidden.
Hint: If you wish to re-enable it, change to (subst enabled) in the
dune-project file.
dune-release: [ERROR] run ['dune' 'subst']: exited with 1

If subst is disabled, then it's not needed and dune-release should skip this, I think. Removing this line fixed it for me:

Sos.run ~dry_run Cmd.(v "dune" % "subst") >>= fun () ->

I also tried with dune-release --dry-run and that got further, but then crashed with:

-: exec: git --git-dir .git checkout --orphan gh-pages
dune-release: internal error, uncaught exception:
              File "lib/sos.ml", line 35, characters 28-34: Assertion failed
@Leonidas-from-XIV
Copy link
Member

In a way I am not even sure that the dune behavior is even correct here; maybe it should just silently do nothing (or print a warning and succeed) since the point of subst disabled is to disable substitution; it doesn't need to break shell commands.

Otherwise we'd need to parse dune-project and see if it is enabled or not; that's kind of annoying as I am not aware of a good way to query dune itself for the information. Or call dune subst and if it fails ignore the failure.

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