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

[BUG] projen generates inconsistent path separator for windows users #624

Closed
floydspace opened this issue Oct 31, 2023 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@floydspace
Copy link

floydspace commented Oct 31, 2023

Describe the bug

When I run projen on my windows machine it regenerates project.json and pnpm-workspace.yaml with inconsistent path separators
image

Expected Behavior

projen default command should produce the same files regardless of platform

Current Behavior

See screenshot above

Reproduction Steps

checkout the same repo with @aws/pdk usage on windows machine and run projen default command

Possible Solution

replace \ with / in generating paths

Additional Information/Context

No response

PDK version used

0.22.6

What languages are you seeing this issue on?

Typescript

Environment details (OS name and version, etc.)

win64; node18; pnpm8

@floydspace floydspace added the bug Something isn't working label Oct 31, 2023
@floydspace floydspace changed the title [BUG] (projen generates inconsistent path separator for windows users) [BUG] projen generates inconsistent path separator for windows users Oct 31, 2023
@agdimech
Copy link
Contributor

agdimech commented Nov 1, 2023

Hi - thanks for raising this. I am unsure is this is going to get PDK working on windows and alot of our scripts are built using bash and I suspect there will be other places that will cause issues on windows. Out of curiosity - are you able to build and test on windows with this change hacked in locally?

@floydspace
Copy link
Author

floydspace commented Nov 1, 2023

Yes, that the first thing I've checked. test though couldn't discover test dir, due to incorrect default testMatch pattern, but I adjusted it through jest configuration.
I believe most of the commands are run by nx which must be mature enough to support windows, but it's my assumption.
I agree that fix I made only covers my setup, but anyway it's not harmful for unix platforms

@floydspace
Copy link
Author

Ah yes and python scripts indeed didn't work on windows, like unset VIRTUAL_ENV was not runnable command, but running python on windows it's a separate story

@agdimech
Copy link
Contributor

Hi - I have chatted with a few windows users and the recommendation we have is that WSL should be used if developing using the PDK on windows. I will close this in favor of: #664

To unblock you - I recommend you install WSL here as a starting point: https://learn.microsoft.com/en-us/windows/wsl/install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants