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

Rustfmt nightly #1767

Merged
merged 2 commits into from
Jul 16, 2017
Merged

Rustfmt nightly #1767

merged 2 commits into from
Jul 16, 2017

Conversation

imp
Copy link
Contributor

@imp imp commented Jul 16, 2017

This PR enables running newish rustfmt tool (known as rustfmt-nightly).
Its version numbering scheme has been restarted from 0.1.0.
To whitelist these new builds, the version regex was changed to only trigger when the version numbers are NOT followed by -nightly suffix.

See #358

Check all those that are applicable and complete.

  • Merged with latest master branch
  • Regenerate documentation with npm run docs
  • Add change details to CHANGELOG.md under "Next" section
  • Added examples for testing to examples/ directory
  • Travis CI passes (Mac support)
  • AppVeyor passes (Windows support)

imp added 2 commits July 16, 2017 15:36
rustfmt-nightly was forked from rustfmt 0.9 and its
version numbering has been reset to 0.1.0.
This commit updates the version check to reject rustfmt only
if its 0.[1-4].x version is not follwed by '-nightly' suffix.
@Glavin001
Copy link
Owner

This is great so far!

Would you be interested in converting the existing Rustfmt beautifier over to using Beautifier Executables? "Executables" standardizes usage, error handling, and generated documentation.

Examples:

@@ -34,7 +34,7 @@ module.exports = class Rustfmt extends Beautifier
else
@run(program, ["--version"], help: help)
.then((stdout) ->
if /^0\.(?:[0-4]\.[0-9])/.test(stdout.trim())
if /^0\.(?:[0-4]\.[0-9])(?!-nightly)/.test(stdout.trim())
Copy link
Owner

Choose a reason for hiding this comment

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

By using "Executables" you could check version with rustfmt.isVersion(YOUR_VERSION). See

isVersion1 = ((phpCsFixer.isInstalled and phpCsFixer.isVersion('1.x')) or \
for example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would love to have a look. Cannot promise I'll have enough free cycles to implement it though.

@Glavin001
Copy link
Owner

No worries, @imp. How about I merge this as is and if you have time it would be awesome to have another Pull Request bringing Rustfmt up to speed using the new Executables feature in Atom-Beautify. Thanks for contributing!

@Glavin001 Glavin001 merged commit 788d002 into Glavin001:master Jul 16, 2017
@Glavin001 Glavin001 self-assigned this Jul 16, 2017
@imp imp deleted the rustfmt-nightly branch July 18, 2017 06:42
@Glavin001
Copy link
Owner

Published to v0.30.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants