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

@all should not try to build -custom bytecode executables #1675

Closed
nojb opened this issue Dec 15, 2018 · 5 comments · Fixed by #1941
Closed

@all should not try to build -custom bytecode executables #1675

nojb opened this issue Dec 15, 2018 · 5 comments · Fixed by #1941

Comments

@nojb
Copy link
Collaborator

nojb commented Dec 15, 2018

When defining byte executables purely for the purpose of compiling to JS with -no-check-prims to avoid errors due to primitives which are only present in JS, they cause errors when compiling in -custom which makes @all unusable.

@nojb
Copy link
Collaborator Author

nojb commented Dec 15, 2018

Better still, maybe a dedicated mode for javascript compilation would solve the problem in a neater way.

@ghost
Copy link

ghost commented Dec 15, 2018

Indeed, we talked about that with @rgrinberg. The only issue is that we can't remove the target when the js mode is not present without breaking backward compatibility. Although, we could add a field (explicit_js_mode) in the dune-project file to force the use of the js mode, and it would become the default in Dune 2.0.

@rgrinberg
Copy link
Member

(using explicit_js_mode 1.0) sounds fine to me. Although I think that for this option to be useful, it would have to be present in the workspace as well. As composing your project with other projects will make the problem resurface.

@nojb do you want to work on this?

@ghost
Copy link

ghost commented Dec 15, 2018

We just talk about this with @rgrinberg, putting it in the workspace file might break the build of vendored projects, so it should really only go in the dune-project file. Regarding the syntax, we could use either (using explicit_js_mode 1.0) or (explicit_js_mode), but given that we expect this feature to not change until Dune 2.0 and to disappear with Dune 2.0, it seems simpler to just write (explicit_js_mode). It's basically a property of the vanilla dune language rather than a proper extension.

@nojb
Copy link
Collaborator Author

nojb commented Dec 19, 2018

@nojb do you want to work on this?

I am interested in the feature, but it is not blocking so I don't want to commit myself at the moment due to extremely tight time availability right now.

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 a pull request may close this issue.

2 participants