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

Add use public names to binaries, and use the right names in targets #1249

Open
samoht opened this issue Oct 26, 2021 · 4 comments
Open

Add use public names to binaries, and use the right names in targets #1249

samoht opened this issue Oct 26, 2021 · 4 comments
Assignees

Comments

@samoht
Copy link
Member

samoht commented Oct 26, 2021

Right now, the target names are ocamlliifed:

$ cat tutorial/hello-key/dune.build
(rule
 (target hello_key)
 (enabled_if (= %{context_name} "default"))
 (action
  (copy main.exe %{target})))

This should be hello-key to match the original unikernel name.

Also, to run this one, one has to type:

$ dune exec -- tutorial/hello-key/main.exe

whereas it would be better to simply write:

$ dune exec -- hello-key

Not that this probably wouldn't work with other build artefacts?

@TheLortex TheLortex self-assigned this Oct 26, 2021
@TheLortex
Copy link
Member

Ocamlification was introduced to generate opam files with correct names (as '.' would confuse opam). Do you know if there are other places were we expect ocamlified names ? I'm working on it but I don't want to make any mistake.

whereas it would be better to simply write:

$ dune exec -- hello-key

It's something that would be achievable by generating (install ..) stanzas. For now, one has to write

$ dune exec -- dist/hello-key

For other targets, it's not possible to have that, but dune build promotes the artifacts in the dist/ folder so

$ solo5-hvt dist/hello-key.hvt

would suffice in any case

@samoht
Copy link
Member Author

samoht commented Oct 26, 2021

Ocamlification was introduced to generate opam files with correct names (as '.' would confuse opam). Do you know if there are other places were we expect ocamlified names ? I'm working on it but I don't want to make any mistake.

I don't know - but if it passes mirage-skeleton I think we are good :-)

It's something that would be achievable by generating (install ..) stanzas. For now, one has to write

that'd be great to have this indeed :-) (I think it was in my previous patch?)

The current dist/ target directory is not super practical for mirage-skeleton as tutorial/hello-key/dist is not at the root of the repo.

@TheLortex
Copy link
Member

The current dist/ target directory is not super practical for mirage-skeleton as tutorial/hello-key/dist is not at the root of the repo.

The problem is that as long as mirage can configure one unikernel at a time it's hard to make everything compose without relying on separate folders.

I've just testing generating (install ..) stanzas but the issue is that dune requires an opam file at the root of the project for it to work.

@dinosaure
Copy link
Member

Due to #1251, should we close this PR?

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

3 participants