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

fix generated opam file - the build rule is now `make "-Csubdir" "build" #1527

Merged
merged 2 commits into from
May 17, 2024

Conversation

hannesm
Copy link
Member

@hannesm hannesm commented May 6, 2024

Previously, sh -exc 'cd subdir && mirage build' was used in the generated opam file as build command. Since #1404 got merged and released, the mirage build subcommand does no longer exist.

In the opam file, now "make build" is used instead.

…ld"`

Previously, `sh -exc 'cd subdir && mirage build'` was used in the generated
opam file as build command. Since mirage#1404 got merged and released, the mirage
build subcommand does no longer exist.

In the opam file, now "make build" is used instead.
test/mirage/action/test.ml Outdated Show resolved Hide resolved
@hannesm
Copy link
Member Author

hannesm commented May 17, 2024

But of course, in the opam file generation, we can avoid the sub being passed, and use the t.subdir (as done before for sh -exc 'cd t.subdir && mirage build'). To me, it is not clear how much logic to encode in which of these layers (Lib.Make.get_cmds vs Opam.pp). Any opinion?

@hannesm
Copy link
Member Author

hannesm commented May 17, 2024

Well, it really is a question where to hardcode these make steps. At the moment, we have the makefile targets in makefile.ml, and they are as well in lib.ml (the get_cmds).

Now, we could enrich the makefile.ml API to expose the pre_build and build targets, and also figure out where to put the configure_cmd and lock_location, and then use the makefile API from the Opam module. Feels like busywork.

@hannesm hannesm merged commit 1006ca5 into mirage:main May 17, 2024
2 of 3 checks passed
@hannesm hannesm deleted the makefile branch May 17, 2024 12:46
hannesm added a commit to hannesm/opam-repository that referenced this pull request May 17, 2024
CHANGES:

- BREAKING: remove `~name` parameter from Mirage.Runtime_args.create
  (mirage/mirage#1541 @samoht, fixes mirage/mirage#1532)
- BREAKING: remove `~name` parameter from Mirage.runtime_arg, and use a
  string (instead of a format string) as third parameter (mirage/mirage#1541 @samoht)
- constrain the `start` function to `unit Lwt.t`. Previously, there was no
  restrictions, and lots of time was spent in debugging when a unikernel
  resulted in `unit Lwt.t Lwt.t` (@Julow mirage/mirage#1524)
- revise man page sections and ordering: ARGUMENTS, OPTIONAL, NETWORK OPTIONS,
  DISK OPTIONS, LOG AND MONITORING OPTIONS, OCAML RUNTIME OPTIONS. Previously,
  the ARGUMENTS and OPTIONS were put later, and were hard to find. These are
  the sections where unikernel-specific arguments are put by default
  (mirage/mirage#1531 @hannesm @reynir)
- add --net=host and --net=ocaml to reduce confusion. --net=host uses the
  TCP/IP socket stack, --net=ocaml the OCaml network stack (mirage/mirage#1525 @hannesm)
- quote Runtime_arg.call (mirage/mirage#1522 @Julow)
- documentation fixes (inline examples @Julow mirage/mirage#1523, @hannesm mirage/mirage#1537 (fixes
  mirage/mirage#1512 reported by @reynir), Runtime_args.create mirage/mirage#1541 @samoht)
- fix the build instructions of the generated opam file: since 4.5.0
  `mirage build` is no longer available, use `make "build"` (mirage/mirage#1527 @hannesm)
- add RELEASE.md, a guide on how to cut a mirage release (mirage/mirage#1519 @samoht)
- allow git 3.16 (mirage/mirage#1536 @hannesm)
- use mirage-bootvar (using dune variant) instead of parse-argv and
  mirage-bootvar-xen, mirage-bootvar-solo5, mirage-bootvar-unix
  (mirage/mirage#1533 @hannesm)
- BUGFIX: reset the lexer location before applying functors in generated code
  (mirage/mirage#1539 @samoht, fixes mirage/mirage#1520 @hannesm)
- BUGFIX: fix off-by-one locations for mirage/main.ml (mirage/mirage#1540 @samoht, fixes
  mirage/mirage#1528 @hannesm)
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

Successfully merging this pull request may close these issues.

None yet

2 participants