Skip to content

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

Open

Description

@talex5

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

Activity

  1. Leonidas-from-XIV commented on Jan 6, 2025

    @Leonidas-from-XIV
    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.

  2. psafont commented on Jan 28, 2026

    @psafont
    Contributor

    I'm able to get around the issue and produce the tarball with dune-release --dry-run. It's unfortunate because I had to disable subst because of a dune bug in a past version.

  3. talex5 commented on Jul 23, 2026

    @talex5
    Author

    This is still failing with dune 3.23.1 and dune-release 2.2.1 (I've updated my fix branch at https://github.com/talex5/dune-release/tree/fix-subst in case that helps anyone else).

  4. talex5 commented on Jul 24, 2026

    @talex5
    Author

    Actually, don't use that branch; it fails to update the documentation (due to #511). This one from 2.0.0 should work:

    opam pin dune-release.2.0.0 git+https://github.com/talex5/dune-release.git#fix-subst-and-docs
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions