Skip to content

mach: Do not use unstable rust for rustfmt - #31441

Merged
mrobinson merged 1 commit into
servo:mainfrom
mrobinson:no-unstable-for-rustfmt
Feb 28, 2024
Merged

mrobinson merged 1 commit into
servo:mainfrom
mrobinson:no-unstable-for-rustfmt

Conversation

@mrobinson

@mrobinson mrobinson commented Feb 28, 2024 •

Copy link
Copy Markdown
Member

We can use stable rust if we pass the unstable configuration as
command-line arguments to rustfmt itself. This prevents needing to
install an unstable rust toolchain.

The one downside here is that it doesn't seem that "ignore" is
supported so we have to start formatting the files in "third_party."
This shouldn't be a huge issue because we don't plan to check much more
rust code into those directories.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because they just adjust the rustfmt call.

Comment thread python/servo/testing_commands.py Outdated

# Servo depends on several `rustfmt` that are unstable. These are still supported by
# stable `rustfmt if they are passed as command-line arguments. These are the
# arguments we sue.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
# arguments we sue.
# arguments we use

Comment thread python/servo/testing_commands.py Outdated
SERVO_TESTS_PATH = os.path.join("tests", "wpt", "mozilla", "tests")

# Servo depends on several `rustfmt` that are unstable. These are still supported by
# stable `rustfmt if they are passed as command-line arguments. These are the

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
# stable `rustfmt if they are passed as command-line arguments. These are the
# stable `rustfmt` if they are passed as command-line arguments. These are the

Comment thread python/servo/testing_commands.py Outdated
WEB_PLATFORM_TESTS_PATH = os.path.join("tests", "wpt", "tests")
SERVO_TESTS_PATH = os.path.join("tests", "wpt", "mozilla", "tests")

# Servo depends on several `rustfmt` that are unstable. These are still supported by

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
# Servo depends on several `rustfmt` that are unstable. These are still supported by
# Servo depends on several `rustfmt` arguments that are unstable. These are still supported by

@mrobinson
mrobinson force-pushed the no-unstable-for-rustfmt branch from e856ed6 to f2bdc2f Compare February 28, 2024 12:12
@mrobinson

Copy link
Copy Markdown
Member Author

@mukilan Thanks for the review. I've updated the PR fixing the typos.

We can use stable rust if we pass the unstable configuration as
command-line arguments to rustfmt itself. This prevents needing to
install an unstable rust toolchain.

The one downside here is that it doesn't seem that "ignore" is
supported so we have to start formatting the files in "third_party."
This shouldn't be a huge issue because we don't plan to check much more
rust code into those directories.
@mrobinson
mrobinson force-pushed the no-unstable-for-rustfmt branch from f2bdc2f to 86ccee8 Compare February 28, 2024 12:19
@mrobinson
mrobinson added this pull request to the merge queue Feb 28, 2024
Merged via the queue into servo:main with commit 98bd306 Feb 28, 2024
@mrobinson
mrobinson deleted the no-unstable-for-rustfmt branch February 28, 2024 16:02
@sagudev sagudev mentioned this pull request Feb 28, 2024
3 of 5 tasks
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.

2 participants