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

Refactor our build.rs files #3789

Merged
merged 13 commits into from
Oct 11, 2023
Merged

Refactor our build.rs files #3789

merged 13 commits into from
Oct 11, 2023

Conversation

emilk
Copy link
Member

@emilk emilk commented Oct 10, 2023

What

This cleans up all our build.rs files by introducing better helpers in re_build_tools. No functionality is actually changed (except a few tiny improvements).

This will make it easier to take take the next steps of opting-in to most of these features.

This is just the first step.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested demo.rerun.io (if applicable)
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@emilk emilk added 🚜 refactor Change the code, not the functionality include in changelog labels Oct 10, 2023
@emilk emilk force-pushed the emilk/refactor-build-rs branch from 19433b4 to 68a6dac Compare October 10, 2023 19:57
@emilk emilk changed the title Refactor our build rs files Refactor our build.rs files Oct 10, 2023
@teh-cmc teh-cmc self-requested a review October 11, 2023 06:48
Copy link
Member

@teh-cmc teh-cmc left a comment

Choose a reason for hiding this comment

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

Besides the CI failure, lgtm.

@@ -57,6 +57,13 @@ pub(crate) fn should_output_cargo_build_instructions() -> bool {
OUTPUT_CARGO_BUILD_INSTRUCTIONS.load(Ordering::Relaxed)
}

/// Are we running inside the workspace of <https://github.com/rerun-io/rerun> ?
///
/// Otherwise we might be running on users machines.
Copy link
Member

Choose a reason for hiding this comment

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

That's an oddly formulated comment 🤔 Running inside the workspace and running on users machines are not antithetical

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, good catch - I'll improve the naming and documentation

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 want to communicate "Rerun user"

Comment on lines 70 to 73
/// We are likely running on a users machine.
///
/// Try to do as little work as possible.
ProbablyUserMachine,
Copy link
Member

Choose a reason for hiding this comment

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

Again, that whole notion of "user machine" is confusing.

I guess this means "OutOfWorkspace" or smth, which is what I would call it then.

@emilk emilk merged commit 05c3c4b into main Oct 11, 2023
30 checks passed
@emilk emilk deleted the emilk/refactor-build-rs branch October 11, 2023 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog 🚜 refactor Change the code, not the functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants