-
Notifications
You must be signed in to change notification settings - Fork 1
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Cannot install in Squeak 6.1alpha #13
Comments
I got the same error on Windows 10 Version 21H2 with Squeak6.1alpha (trunk) |
I'm afraid this isn't very helpful, but I have seen the same error message in different contexts within the last months, too (Windows 10 21H1). This error occurred for different repositories while trying to install them via Metacello. While resetting all MC-caches in the image and in the file system was not helpful for me, explicitly specifying the revision (git commit instead of |
After experiencing the same issue one time too often again, here are some new insights: I found out that some of the paths in the The original My temporary solution was to move the image's cache into another directory to shorten the paths:
However, I don't like this solution, it's an ugly workaround. Besides improving the error handlers in Metacello, the VM should be able to deal with long paths. Maybe just the |
New insight: OSVM is aware of long UNC paths: for instance, |
I don't feel like deep-diving into them VM today, but I think that in the following place: the path might have been converted differently (non-UNC-aware) as opposed to: |
Well, this regression in We are now using two primitives, which is only the old one A quick workaround is to revert Note that that long-path issue might also affect Well, it might be performance-related, but for checking whether an instance of Unfortunately, this will not work for paths above 260-n chars. Not sure why. |
Well, from my perspective, we could just default to index 0 and keep on using that other primitive for empty directories ... not sure how good this works across platforms, though ... path := 'C:\Tools\squeak_60_aio_aksödölasidhrjaölskdncölasdkjfhasöldkncaöslkdjfhöa_sakldhfalsdkcnaösldkjfh\Squeak6.0-22101-64bit-All-in-One.app\Contents\Resources\github-cache\hpi-swa-teaching#Morphic-Testing-Framework\master\hpi-swa-teaching-Morphic-Testing-Framework-d360cf7\packages\MorphicTestingFramework-Samples.package\MTFCalculatorTest.class\instance\'.
path size. " 350 "
dir := FileDirectory on: path.
dir primLookupEntryIn: path asVmPathName index: 1. " #('setUp.st' 3844156136 3844156136 false 79)"
dir primLookupEntryIn: path asVmPathName index: 0. " #('.' 3844156136 3844156136 true 0) "
name := 'setUp.st'.
dir primLookupEntryIn: path asVmPathName name: name asVmPathName. " #('setUp.st' 3844156136 3844156136 false 79) "
dir primLookupEntryIn: path asVmPathName name: '.' asVmPathName. " nil <-- ERROR!"
"----"
controlPath := 'C:\Tools'.
controlDir := FileDirectory on: controlPath.
controlDir primLookupEntryIn: controlPath asVmPathName name: '.' asVmPathName. " #('.' 3717839515 3844921042 true 0) <-- OK!" |
The primitive |
Source: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation Yeah, we have to find another API call that removes those ".." or "." from the path if any. |
FWIW, in case someone is googling this: An MNU "UndefinedObject>>dependencies" from [] in MetacelloFetchingMCSpecLoader>>resolveDependencies:nearest:into: also points to this issue. The workaround from above still applies. A fix for this issue is in progress, see http://lists.squeakfoundation.org/pipermail/squeak-dev/2022-November/222766.html. |
Have we merged the fix yet into the VM? |
@marceltaeumel The patch is here and ready to merge: https://lists.squeakfoundation.org/archives/list/squeak-dev@lists.squeakfoundation.org/message/OBH7IN5AVSVN4LVY6AVEUEPGYAIWDTTG/ |
|
It's all: Platform-specific code, slang, and image-side comments. I did not want to create scattered PRs and inbox versions before the proposal gets accepted. :-) |
…indows by well-defining an edge case in the Windows implementation of the FilePlugin primitiveDirectoryEntry. Documents the present limitations to syntactic sugar in long file paths in the platform code. An alternative consideration was to rewrite FileDirectory>>#exists to pass an empty string as file name to the primitive instead of modifying the VM, but strictly speaking, even this would have exploited an undefined behavior in the VM plugin, and an empty file name would be less idiomatic than a single dot. For the original bug report, see: hpi-swa-teaching/Morphic-Testing-Framework#13 Thanks to Marcel (mt) for his support! Revision (4): Added example paths to comments and fixed erratum in comment of FilePlugin>>#primitiveDirectoryEntry.
Closing via VMMaker.oscog-mt.3336/Files-mt.205/OpenSmalltalk/opensmalltalk-vm@330d677. If you are using an older VM, please use the workaround described above. |
Source code unpacking does not work on Windows 11. Maybe the path length is too deep? Maybe it is about that 0 bytes README.md in BaselineOfMorphicTestingFramework.
The text was updated successfully, but these errors were encountered: