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

preliminary rules/engine split #3742

Merged
merged 7 commits into from
Aug 26, 2020
Merged

Conversation

cwong-ocaml
Copy link
Collaborator

As per #3703 . This split was done mostly mechanically, taking build_system and all dependencies and putting them into dune_engine, renaming dune to dune_rules. Then, open Dune_engine was put at the top of all files in dune_rules, and finally all the relevant build errors (due to other parts of the codebase referring to Dune) were fixed.

There should be no behavioral changes; this is only a refactoring.

I think, if there are no major objections, we should merge this soon, and we can work on bikeshedding the rest (which files should be in which library, etc) afterwards.

Signed-off-by: Cameron Wong [email protected]

@cwong-ocaml cwong-ocaml requested a review from rgrinberg August 26, 2020 01:09
Signed-off-by: Cameron Wong <[email protected]>
Copy link
Collaborator

@aalekseyev aalekseyev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than duplication of assets.ml, looks reasonable to me.

Signed-off-by: Cameron Wong <[email protected]>
let jbuild_plugin_ml = {jbp|let () =
let jbuild_plugin_ml =
{jbp|
let () =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You added an extra linebreak here. Why was this change needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is not added, CI fails with a "code is not formatted properly" error.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, but it wasn't there before...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I don't know what is or isn't going wrong. Basically all of the previous commits were failing CI with a formatting error, and running ocamlformat 0.14.3 on this file (alternatively, make fmt) also produces this change.

Copy link
Collaborator Author

@cwong-ocaml cwong-ocaml Aug 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, perhaps this file shouldn't be checked in at all if it is generated from the dune rules -- it looks like it is generated by wrapping some ppx around the contents of jbuild_plugin.ml and jbuild_plugin.mli and nothing else. I certainly don't think that it makes sense to check the formatter against such a file.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file was referenced in .ocamlformat-ignore, I think you just need to update this file.

Copy link
Collaborator Author

@cwong-ocaml cwong-ocaml Aug 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aha, that would do it, how careless of me.

I stand by what I said earlier, however -- I think that it does not make sense to check in such a file to git when it is entirely a wrapper around another. However, I suppose such a change can be argued over later.

@cwong-ocaml cwong-ocaml merged commit 6d83f12 into ocaml:master Aug 26, 2020
@rgrinberg
Copy link
Member

I stand by what I said earlier, however -- I think that it does not make sense to check in such a file to git when it is entirely a wrapper around another. However, I suppose such a change can be argued over later.

The generated file is checked in to simplify the bootstrap procedure. It's not simple to generate things when bootstrapping because we don't have the full build system available.

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.

4 participants