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

Rewrite tools/format.py in deno #1528

Merged
merged 2 commits into from
Jan 17, 2019
Merged

Rewrite tools/format.py in deno #1528

merged 2 commits into from
Jan 17, 2019

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented Jan 15, 2019

closes #1319

- ./tools/build.py -C target/release
- ./tools/test_format.py

Choose a reason for hiding this comment

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

Hi, I may be wrong but there be a ts extension here, not py?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, this script is still in python. (I replaced format.py with format.ts, but test_format.py is still written in python. I think that rewriting that script in deno is another good first issue.)

Choose a reason for hiding this comment

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

Ah I see 👍

@ry
Copy link
Member

ry commented Jan 15, 2019

@kt3k Very nice - it's green! Have you used code from previous attempts at this (#1434 #1366)? If so, please give credit in the commit message.

@kt3k
Copy link
Member Author

kt3k commented Jan 15, 2019

@ry Yes, I used the idea of findFiles from @pseudo-su's attempt! Added the mention about it in commit message.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

Awesome work - just one comment

@@ -8,11 +9,11 @@


def main():
util.run([sys.executable, "tools/format.py"])
util.run(["target/release/deno", "--allow-run", "tools/format.ts"])
Copy link
Member

Choose a reason for hiding this comment

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

  1. I'm not sure how this works on Windows, because it should need the .exe extension. Use executable_suffix in util.py
  2. In certainly situations we might have target/debug/deno and not the release one. It would be good to check for existence of each, preferring the release one.

Copy link
Member Author

@kt3k kt3k Jan 16, 2019

Choose a reason for hiding this comment

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

I added code to choose deno in preference of release -> debug -> globally installed version.

@kt3k kt3k force-pushed the feature/format-ts branch 4 times, most recently from 11f12ac to 0075893 Compare January 16, 2019 05:48
Note: findFiles and findFilesWalk are borrowed from the previous
attempt of @pseudo-su (denoland#1434). Thanks!
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM - thanks!

@ry ry merged commit f19622e into denoland:master Jan 17, 2019
@kt3k kt3k deleted the feature/format-ts branch January 24, 2019 02:55
ry added a commit to ry/deno that referenced this pull request Feb 12, 2019
tools/format.ts is making CI flaky and it's difficult to run right now.
Reverting to tools/format.py

This reverts commit f19622e.
ry added a commit to ry/deno that referenced this pull request Feb 12, 2019
tools/format.ts is making CI flaky and it's difficult to run right now.
Reverting to tools/format.py

This reverts commit f19622e.
ry added a commit that referenced this pull request Feb 12, 2019
tools/format.ts is making CI flaky and it's difficult to run right now.
Reverting to tools/format.py

This reverts commit f19622e.
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.

Rewrite tools/format.py in deno
3 participants