How do I solve
$ dune build
File "bot-components/dune", line 13, characters 0-251:
13 | (rule
14 | (targets schema.json)
15 | (deps .github-token (universe))
16 | (action
17 | (with-stdout-to
18 | %{targets}
19 | (run get-graphql-schema --json --header
20 | "Authorization=Bearer %{read:.github-token}"
21 | https://api.github.com/graphql)))
22 | (mode promote))
Error: No rule found for bot-components/.github-token
?
If I touch bot-components/.github-token
, now I get
$ dune build
File "bot-components/dune", line 19, characters 8-26:
19 | (run get-graphql-schema --json --header
^^^^^^^^^^^^^^^^^^
Error: Program get-graphql-schema not found in the tree or in PATH
(context: default)
How do I install this program?
I guess maybe I want dune build --ignore-promoted-rules
?
Then I get
$ dune build --ignore-promoted-rules
File "src/config.mli", line 1, characters 29-44:
1 | val toml_of_file : string -> TomlTypes.table
^^^^^^^^^^^^^^^
Error: Unbound module TomlTypes
Are you looking at the .github/CONTRIBUTING doc?
(it contains build instructions)
Yes, that's where I looked to find dune build --ignore-promoted-rules
(sorry for posting here before looking there). But it doesn't say anything about TomlTypes
, I think
$ opam install toml
[NOTE] Package toml is already installed (current version is 7.0.0).
It suggests to use nix
It looks like my version of toml is too new, according to dune-project. I thought dune was supposed to catch errors like this?
After doing opam install --deps-only .
, I get
$ dune build --ignore-promoted-rules
File "src/config.ml", lines 88-98, characters 2-32:
88 | ..match
89 | let private_k = Sys.getenv_exn "GITHUB_PRIVATE_KEY" in
90 | Stdio.printf "Found private key: %s\n" private_k ;
91 | private_k |> Cstruct.of_string |> X509.Private_key.decode_pem
92 | with
...
95 | (Mirage_crypto_pk.Rsa.priv_bits priv) ;
96 | priv
97 | | Error (`Msg e) ->
98 | raise (Failure (f "%s" e))
Error (warning 8): this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
Ok (`P256 _|`P521 _|`P384 _|`P224 _|`ED25519 _)
Maybe there's a missing upper-bound version constraint?
Maybe there's a missing upper-bound version constraint?
Yes, that's possible. I only catch missing upper bound constraints when they make the deploy build fail. But the deploy build uses dune build -p
so builds without warnings.
Indeed maybe the contributing guide could be updated to distinguish between "local release build" and "local dev build"
Last updated: Sep 09 2024 at 04:02 UTC