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

Cannot save method with selector length > 255 #127

Open
numberpi opened this issue Jun 18, 2014 · 7 comments
Open

Cannot save method with selector length > 255 #127

numberpi opened this issue Jun 18, 2014 · 7 comments

Comments

@numberpi
Copy link

You cannot save a method with length > 255 to filetree, because NTFS limits file name length to 255.

Example method from Monticello:

image

Error:

image

@dalehenrich
Copy link
Owner

I hat to say, this but that is a limitation that probably dates back to the
1980's ... I know that doesn't help, but I'm not sure what the answer is
other than writing an entirely different implementation of FileTree to
accommodate an out-dated limitation?

If you are able to come up with a viable workaround for NTFS, I'd be
willing to merge it into the code base...

Dale

On Wed, Jun 18, 2014 at 10:13 AM, numberpi [email protected] wrote:

You cannot save a method with length > 255 to filetree, because NTFS
limits file name length to 255.

Example method from Monticello:

[image: image]
https://cloud.githubusercontent.com/assets/4451364/3317293/98e82d14-f70b-11e3-9398-ffcab353c70c.png

Error:

[image: image]
https://cloud.githubusercontent.com/assets/4451364/3317297/a4cf6ad4-f70b-11e3-9e8a-d2d8f3b2263b.png


Reply to this email directly or view it on GitHub
#127.

@krono
Copy link
Collaborator

krono commented Jun 19, 2014

Sadly, this limitation is common, according to https://en.wikipedia.org/wiki/Filename

FS Length
VFAT 255
NTFS 255
HFS+ 255
ext3 255
UFS 255

The only one with longer names would be Amiga SFS with 32,000.

So at some point we have to deal with this :(

@krono krono changed the title Cannot save method with length > 255 Cannot save method with selector length > 255 Jun 19, 2014
@dalehenrich
Copy link
Owner

Interesting ... the only folks who I've heard having problems are folks using windows. For example I published a one-click that image that had it's github-cache included and a windows user said then when he unzipped the file, windows complained about that directory and he ended up deleting it (I admit that I do not remember the exact error) ... the zip file was create on a mac and I was able to use it on both mac and linux without problems ... perhaps there are other Windows filesystem limitations that he ran into?

Here's a 298 character file name that I was able to use on my mac:

/Users/daleh/Pharo1.4/tODE_0.0.1-p1.4.app/Contents/Resources/github-cache/dalehenrich/metacello-work/8d57503cbcdb4cbf31730e6d9b12b18a55fa0171/dalehenrich-metacello-work-8d57503/repository/Metacello-TestsMCB.package/MetacelloDetermineCurrentVersionForLoadScriptTest.class/instance/testIssue112new.st

So something does not compute...

@krono
Copy link
Collaborator

krono commented Jun 19, 2014

Sorry for having been unclear, the maximum length of 255 (byte or unicode code points, depending on file system) is not for the whole path but only its final component, the file name itself. That is why saving the Monticello Package (which @numberpi tried) won't work no neither windows, mac, or linux.

Other than that, yes, NTFS has a practical path length restriction of about 260 characters (which typically shadows the 255 character filename limit)

@dalehenrich
Copy link
Owner

Okay ... the one who complained about the github cache problem implied that there is a pathname limitation on windows as well and I assumed that this was a variant of the same problem ... presumably there will be additional issues on windows:)

If it a single file name that is the problem, then the name can be replaced with any unique sequence of characters ... Patching the method MCFileTreeStCypressWriter>>fileNameMapFor for long filenames should be pretty straightforward...

@krono
Copy link
Collaborator

krono commented Jun 19, 2014

I'll take on this once I find some time :)

@dalehenrich
Copy link
Owner

Haha, that's my problem as well ...

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

No branches or pull requests

3 participants