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

x.py: do not build Miri by default on stable/beta #73232

Merged
merged 1 commit into from
Jun 14, 2020

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Jun 11, 2020

Fixes #73117

Do I need to do anything to make sure Miri is still built by the tools CI builder? Are there other tools that should be off-by-default?

Also, unfortunately the DEFAULT associated const has no doc comment, so I have no idea what it does, or why there are semmingly two places where the default build of tools is controlled.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 11, 2020
Cargofmt, rustfmt, "src/tools/rustfmt", "cargo-fmt", default=true, {};
CargoClippy, clippy, "src/tools/clippy", "cargo-clippy", default=true, {};
Clippy, clippy, "src/tools/clippy", "clippy-driver", default=true, {};
Miri, miri, "src/tools/miri", "miri", default=false, {};
Copy link
Contributor

Choose a reason for hiding this comment

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

This will disable miri on nightly and dev builds.

Something like that should enable miri for nightly and dev builds:

    Miri, miri, "src/tools/miri", "miri", default=builder.build.unstable_features(), {};

Alternatively enable for nightly only:

    Miri, miri, "src/tools/miri", "miri", default=builder.build.config.channel == "nightly", {};

Copy link
Member Author

Choose a reason for hiding this comment

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

I can't use run-time values though if I put this into the DEFAULT constant (whatever that does). Also I think hygiene will prevent me from referring to builder, but I could use a closure to get around that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, maybe Mark comes up with an idea.

Copy link
Member Author

Choose a reason for hiding this comment

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

For now I changed the macro to say whether a tool is "stable", and then just enable all tools per default on nightly/dev builds.

But I still have no idea what to do with that undocumented DEFAULT constant.

@RalfJung RalfJung force-pushed the miri-no-default branch 2 times, most recently from 141d895 to 8135c5a Compare June 11, 2020 08:57
@rust-highfive

This comment has been minimized.

Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

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

This seems reasonable, though would be good to fixup the FIXME.

@@ -606,17 +607,22 @@ macro_rules! tool_extended {

impl Step for $name {
type Output = Option<PathBuf>;
const DEFAULT: bool = true;
const DEFAULT: bool = $stable; // FIXME What does this do?
Copy link
Member

Choose a reason for hiding this comment

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

DEFAULT-enabled tools means that this step will be run by default (e.g., on x.py build). In this case it's also subject to the default_condition in should_run, though.

Copy link
Member Author

Choose a reason for hiding this comment

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

@Mark-Simulacrum I updated the PR. Does it make sense now?

@Mark-Simulacrum Mark-Simulacrum changed the title x.py: do not build Miri by default x.py: do not build Miri by default on stable/beta Jun 12, 2020
@Mark-Simulacrum
Copy link
Member

Thanks for adding a comment to DEFAULT while we're at it :)

This does indeed look correct to me, though (as all defaults) it should be noted that people can override this by explicitly requesting a miri build (e.g. x.py build src/tools/miri) but that seems fine.

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 12, 2020

📌 Commit 416b010 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 12, 2020
@RalfJung
Copy link
Member Author

by explicitly requesting a miri build (e.g. x.py build src/tools/miri) but that seems fine.

Yeah, or by adding it to tools. But if they asked for it, they should get it IMO -- seems fine.

@Dylan-DPC-zz
Copy link

@bors p=1

@bors
Copy link
Collaborator

bors commented Jun 14, 2020

⌛ Testing commit 416b010 with merge 10326d8...

@bors
Copy link
Collaborator

bors commented Jun 14, 2020

☀️ Test successful - checks-azure
Approved by: Mark-Simulacrum
Pushing 10326d8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 14, 2020
@bors bors merged commit 10326d8 into rust-lang:master Jun 14, 2020
@bors bors mentioned this pull request Jun 14, 2020
@RalfJung RalfJung deleted the miri-no-default branch June 15, 2020 17:08
@mati865 mati865 mentioned this pull request Jul 15, 2020
@cuviper cuviper added this to the 1.46 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rust 1.44.0 fails to build in miri v0.1.0 on NetBSD/i386 8.0
7 participants