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

Add Windows support #296

Merged
merged 10 commits into from
Jul 12, 2024
Merged

Add Windows support #296

merged 10 commits into from
Jul 12, 2024

Conversation

he0119
Copy link
Contributor

@he0119 he0119 commented Jul 12, 2024

Fix #10, and tested on my project https://github.com/he0119/nonebot-plugin-user/actions/runs/9900996813.

Should have a lot of room for improvement.

Tool cache seems to be broken.

@he0119 he0119 requested a review from eifinger as a code owner July 12, 2024 03:05
Copy link
Owner

@eifinger eifinger left a comment

Choose a reason for hiding this comment

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

Thank you for this addition!
Please use ${path.sep} everywhere to replace the hardcoded unix path separators /.

Once merged I will add tests on windows runners

src/download/download-latest.ts Show resolved Hide resolved
src/download/download-latest.ts Show resolved Hide resolved
src/download/download-version.ts Show resolved Hide resolved
src/download/download-version.ts Show resolved Hide resolved
src/restore-cache.ts Outdated Show resolved Hide resolved
src/restore-cache.ts Outdated Show resolved Hide resolved
@he0119
Copy link
Contributor Author

he0119 commented Jul 12, 2024

Please use ${path.sep} everywhere to replace the hardcoded unix path separators /

Maybe only changing venvPath should fix the problem.

@he0119 he0119 requested a review from eifinger July 12, 2024 09:57
@eifinger
Copy link
Owner

Please use ${path.sep} everywhere to replace the hardcoded unix path separators /

Maybe only changing venvPath should fix the problem.

It is not enough. Please also change the other occurrences such as the workingDir

@he0119
Copy link
Contributor Author

he0119 commented Jul 12, 2024

It is not enough. Please also change the other occurrences such as the workingDir

Tried my best to find all hardcoded unix path separators /.

@he0119
Copy link
Contributor Author

he0119 commented Jul 12, 2024

> setup-rye@4.0.0 lint
> eslint src/**/*.ts --fix


/home/runner/work/setup-rye/setup-rye/src/download/download-latest.ts
Error:   22:16  error  Expected '===' and instead saw '=='  eqeqeq
Error:   [31](https://github.com/eifinger/setup-rye/actions/runs/9906762585/job/27370120893?pr=296#step:5:32):16  error  Expected '===' and instead saw '=='  eqeqeq

/home/runner/work/setup-rye/setup-rye/src/download/download-version.ts
Error:   [33](https://github.com/eifinger/setup-rye/actions/runs/9906762585/job/27370120893?pr=296#step:5:34):16  error  Expected '===' and instead saw '=='  eqeqeq
Error:   43:16  error  Expected '===' and instead saw '=='  eqeqeq

✖ 4 problems (4 errors, 0 warnings)

Error: Process completed with exit code 1.

There are some lint errors.

@eifinger
Copy link
Owner

> setup-rye@4.0.0 lint
> eslint src/**/*.ts --fix


/home/runner/work/setup-rye/setup-rye/src/download/download-latest.ts
Error:   22:16  error  Expected '===' and instead saw '=='  eqeqeq
Error:   [31](https://github.com/eifinger/setup-rye/actions/runs/9906762585/job/27370120893?pr=296#step:5:32):16  error  Expected '===' and instead saw '=='  eqeqeq

/home/runner/work/setup-rye/setup-rye/src/download/download-version.ts
Error:   [33](https://github.com/eifinger/setup-rye/actions/runs/9906762585/job/27370120893?pr=296#step:5:34):16  error  Expected '===' and instead saw '=='  eqeqeq
Error:   43:16  error  Expected '===' and instead saw '=='  eqeqeq

✖ 4 problems (4 errors, 0 warnings)

Error: Process completed with exit code 1.

There are some lint errors.

Saw those. I am currently trying to find out why it complains here but nowhere else

@eifinger
Copy link
Owner

> setup-rye@4.0.0 lint
> eslint src/**/*.ts --fix


/home/runner/work/setup-rye/setup-rye/src/download/download-latest.ts
Error:   22:16  error  Expected '===' and instead saw '=='  eqeqeq
Error:   [31](https://github.com/eifinger/setup-rye/actions/runs/9906762585/job/27370120893?pr=296#step:5:32):16  error  Expected '===' and instead saw '=='  eqeqeq

/home/runner/work/setup-rye/setup-rye/src/download/download-version.ts
Error:   [33](https://github.com/eifinger/setup-rye/actions/runs/9906762585/job/27370120893?pr=296#step:5:34):16  error  Expected '===' and instead saw '=='  eqeqeq
Error:   43:16  error  Expected '===' and instead saw '=='  eqeqeq

✖ 4 problems (4 errors, 0 warnings)

Error: Process completed with exit code 1.

There are some lint errors.

Saw those. I am currently trying to find out why it complains here but nowhere else

Lets use === I am sorry about my comment earlier. Seems like there are some edge cases where the Typescript compiler does not catch everything so === and !== should be used. I was wrong.

@he0119
Copy link
Contributor Author

he0119 commented Jul 12, 2024

Lets use === I am sorry about my comment earlier. Seems like there are some edge cases where the Typescript compiler does not catch everything so === and !== should be used. I was wrong.

Ok, that commit has been reverted.

Copy link
Owner

@eifinger eifinger left a comment

Choose a reason for hiding this comment

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

🚀 Awesome! Thank you for your contribution!

@eifinger eifinger merged commit b0de59c into eifinger:main Jul 12, 2024
36 checks passed
@he0119 he0119 deleted the feat/windows branch July 12, 2024 16:07
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.

Support additional platforms
2 participants