Closed
Conversation
4cc9a60 to
19b4b95
Compare
Contributor
|
Sorry for the naïve quesiton but I really know nothing about the way
dune works; neither in gneral, nor to build the compiler.
Does it need to change directory to work properly?
Isn't it possible for dune to stay at the root directory and run
everything from there as we are going to do for make?
|
Contributor
|
Regarding `runtime/gen_primitives.sh`, I am wondering. Rather than
hardcoding the names of the files that need to be scanned for
primitives, wouldn't it be simpler to pass the file names as arguments
to the script?
That way, the script itself would not need to know the list and it
wouldn't care from which directory it is called. When invoked from the
root Makefile we would make sure that the names of the files are
prefixed with `runtime/`, and if `dune` wants to call it from within the
`runtime/` directory it would just have to not use the dirname as a
prefix.
How about this?
|
Contributor
Author
|
It is possible; it just wasn't done that way initially because I was trying to reproduce the Makefile structure. |
Contributor
Author
Sounds good. |
Contributor
|
Thomas Refis (2022/08/30 05:40 -0700):
It is possible; it just wasn't done that way initially because I was
trying to reproduce the Makefile structure.
Yes, sure, it makes sense.
Apparently it was recently decided to change that;
If you mean on the make side yes, I can confirm it's a work in progress
and it started not so long ago and takes time and work.
but I have just been
focusing on having the minimal patches to have the dune build work, not to
rewrite it all.
Sure. If one day work is done on merging everything into one dingle dune
file, I'd be interested in an experiment report, to know whether, for
Dune, such a merge makes sense / makes things simpler, or whether it's
more convenient when working with Dune to have things split over several
files.
|
Contributor
|
Thomas Refis (2022/08/30 05:41 -0700):
> How about this?
Sounds good.
Cool!
Are you willing to implement the change to the shell script as part of
your PR?
|
nojb
reviewed
Aug 30, 2022
| output="$prim.c" | ||
| else | ||
| output="runtime/$prim.c" | ||
| fi |
Contributor
There was a problem hiding this comment.
For what is worth, what I do to make scripts robust wrt to the current directory is to add a cd $(dirname "$0") at the top of the script, which has the effect of putting yourself in the directory that contains the script itself (here, runtime/).
Contributor
Author
|
Closing for now as more things are needed to fix the dune build. |
xavierleroy
added a commit
to xavierleroy/ocaml
that referenced
this pull request
Sep 21, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two things here:
gen_primitives.shhad changed and assumed it was being run from the root of the repository; I decided to add "a flag" to change that behavior … pardon my bash.cc @OlivierNicole