Effect is a keyword in ocaml 5.3 #924
Closed
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.
TLDR
I was compiling the project using Ocaml 5.3.0 and got some syntax errors. Currently the easiest fix is to rename the variables causing the issues from
effecttoside_effectsince they represent a boolean which in turn represents whether something has side effects.Explaination
In Ocaml 5.3.0 the
effectkeyword was added, see the release here.A couple places in the
/src/bootproject useseffectas a variable name and hence the project does not compile using Ocaml 5.3.0.With 5.3.0 a
-keywordsflag was added and appending-keywords 5.2to the compilation flags would avoid this issue. See this PR. However, sincebootis compiled using dune this is not currently possible. This is because when I randune b --verboseI discovered that dune runs ocamldep first which throws the syntax error and dune does not currently have the ability to pass flags to ocamldep. See this issue. Ocamldep does support the-keywordsflag on the newest development branches, however, this was added in this PR. That PR was after the release of 5.3.0 and so ocamldep 5.3.0 does not support the-keywordsflag. And even if it did, like mentioned earlier, dune does not currently support sending flags to ocamldep.