-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support Windows paths #33
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a great start, thanks for leading this! I've left a few comments, feel free to address them whenever you like :)
Interesting - I wonder whether that's a bug or a feature 🤔
Good point - that would be in |
For now, It might be enough if we add an explaination in the doc? Its something transparent in most cases and handling it might be more tricky than useful (IMO)
Ok, I'm changing this now |
Yup, I concur - I've updated the wording in the help message (I plan to auto-generate the CLI documentation from the website based on the actual source code). |
There is still some problems, even if we should be able to do a I'd like to make |
Awesome! What are the current blockers that prevent Something that would be very useful too would be to add a Windows build to our Azure CI, this way we can start making sure that future PRs won't make us regress. |
I enabled the Windows pipeline in the config file. Current blockers:
berry/packages/berry-cli/package.json Lines 35 to 37 in 8a7b0cc
|
UPDATE: Now I have a problem with The content of these files fail and I don't really know why... berry/packages/berry-core/sources/scriptUtils.ts Lines 15 to 22 in 4fa6508
|
Current CI state:
This is likely because To fix that we would need to add some logs in |
Well, that's not great - seems like the symlink is dropped when cloning the repository 😞 |
I fixed the symlink problem by enforcing This problem looks weird - it's like the Node executable cannot be found, but the path looks legit:
|
Oh right forgot to mention it but I had to enable the So the problem seems to be at the second spawn, I was thinking about the |
Fixed! There was two problems:
The remaining issue seems to be related to the PnP hook, which isn't aware that it needs to transform back and forth the If you use |
This reverts commit e616b6b.
News: I'm close to having a working build! The native patch seems to work but I get this error when building:
Any idea why? |
Oh interesting - I think it's just because we should be calling |
I gave a quick look - it seems that you made it so the API always returns portable paths. I think this detail should be hidden from the API consumer, so the functions should both accept native paths and return them. Does it make sense? |
Yes, it makes sense... I used only portable path because PnP patch I can make the API transform back to physical path but it wouldn't work until we transform it back to a portable path. Example: Portable path: How do we deal with this behaviour? |
Indeed, I forgot about this! I think the solution would be for the PnP API not to use the actual Node filesystem in the first place - since we need the Zip layer anyway, it only makes sense to directly use the ZipOpenFS instance we've created. I've made a patch to try something in this sense, hopefully that'll help! |
We're almost there! The build now works!! 😃 Now there's about 21 tests that fail (out of 167, so that's pretty good!). After a quick look:
How do you wish to proceed? I was thinking maybe we can merge this PR to prevent further conflicts, and work on making the remaining tests pass on separate PRs, what do you think? |
Awesome! 🎉 🎉
Works for me! I'll start working on it this week I think.
Awesome, thanks! I'll email you my postal address soon 😃 |
Following #29, I tried to implement
fromPortablePath
andtoPortablePath
in order to make it work on windows.For now, its just a Draft PR, it's still not fully working but I'm making progress 🎉
I will continue working on it in the coming days
EDIT: I got it to work on windows (
yarn install
berry itself).Still some things to look:
yarn config -v
, it displays posix paths.yarnrc
file?ZipFS
yarn build:cli
on Windows