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

Effect is a keyword in ocaml 5.3 #925

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

wmuth
Copy link
Contributor

@wmuth wmuth commented Mar 14, 2025

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 effect to side_effect since they represent a boolean which in turn represents whether something has side effects.

Explaination

In Ocaml 5.3.0 the effect keyword was added, see the release here.

A couple places in the /src/boot project uses effect as a variable name and hence the project does not compile using Ocaml 5.3.0.

With 5.3.0 a -keywords flag was added and appending -keywords 5.2 to the compilation flags would avoid this issue. See this PR. However, since boot is compiled using dune this is not currently possible. This is because when I ran dune b --verbose I 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 -keywords flag 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 -keywords flag. And even if it did, like mentioned earlier, dune does not currently support sending flags to ocamldep.

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.

1 participant