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

fix: Use .zip in archive path #119

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dnys1
Copy link

@dnys1 dnys1 commented Dec 31, 2023

Fixes #118

Ensures that downloads of the Dart SDK zip file carry the .zip extension so that subsequent calls to Expand-Archive on Windows succeed.

Notes

  • The diff of index.mjs is quite large. I believe this is due to the version of Node I'm using (20.7.0). Happy to use a different version to keep the diff small, but wasn't sure which one is currently used. This could be noted in package.json (under engines), if desired, to ensure alignment with external contributions.

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

@mit-mit
Copy link
Member

mit-mit commented Apr 29, 2024

Thanks @dnys1! Would you mind resolving conflicts? Then we'll take a look.

Fixes dart-lang#118

Ensures that downloads of the Dart SDK zip file carry the `.zip` extension so that subsequent calls to `Expand-Archive` on Windows succeed.

## Notes

- The diff of `index.mjs` is quite large. I believe this is due to the version of Node I'm using (`20.7.0`). Happy to use a different version to keep the diff small, but wasn't sure which one is currently used. This could be noted in `package.json` to ensure alignment with external contributions.
@dnys1
Copy link
Author

dnys1 commented May 1, 2024

@mit-mit Done 😄

Copy link
Member

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

Can you also add a new changelog entry to the changelog file? You can start a new v1.6.5-wip entry.

The diff of index.mjs is quite large. I believe this is due to the version of Node I'm using (20.7.0). Happy to use a different version to keep the diff small, but wasn't sure which one is currently used. This could be noted in package.json (under engines), if desired, to ensure alignment with external contributions.

fwiw I'm using v20.6.1. If you think that this will reduce diffs then PRs here would be welcome. We're mostly treating the dist/index.mjs file as opaque - we know it works if all the CI tests pass. Do you think specifying a specific version of node would help? I'd be worried about then remembering to rev that version periodically. Plus, many of the diffs in the file may be from the npm packages in use?

await promiseToFuture<String>(toolCache.downloadTool(url));
final archivePath = path.join(
// `RUNNER_TEMP` variable is guaranteed to be present.
// https://github.com/actions/toolkit/blob/5430c5d84832076372990c7c27f900878ff66dc9/packages/tool-cache/src/tool-cache.ts#L756
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// https://github.com/actions/toolkit/blob/5430c5d84832076372990c7c27f900878ff66dc9/packages/tool-cache/src/tool-cache.ts#L756
// https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables

@@ -8,7 +8,7 @@ import 'dart:js_interop';
external ToolCache get toolCache;

@JS()
extension type ToolCache (JSObject obj) {
extension type ToolCache(JSObject obj) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: can you confirm that this file is dart formatted?

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.

Installation fails on Windows 11
3 participants