pharo-vcs / iceberg

Iceberg is the main toolset for handling VCS in Pharo.
MIT License
134 stars 85 forks source link

Error on Update on Windows #94

Closed jecisc closed 6 years ago

jecisc commented 8 years ago

I just executed this on a Pharo 6 image on Windows 7:

Metacello new
  baseline: 'Iceberg';
  repository: 'github://npasserini/iceberg:stable';
  load.

Iceberg update

And I got a SubscriptOutOfBounds: 1 error.

Here is the stack:

Array(Object)>>errorSubscriptBounds: Array(Object)>>at: Array(SequenceableCollection)>>first IceMCGitRepository(MCFileTreeGitRepository)>>isGitRepository: IceMCGitRepository(MCFileTreeGitRepository)>>directory: IceMCGitRepository>>validate IceRepository>>repository: IceRepository>>createRepository IceRepository>>ensureLocalRepository IceRepository>>register MCGitHubRepository>>getOrCreateIcebergRepository [ :repo | ^ repo getOrCreateIcebergRepository ] in [ :class | existingRepositories detect: [ :repo | repo isKindOf: class ] ifFound: [ :repo | ^ repo getOrCreateIcebergRepository ] ] in Iceberg class>>repositoryForPackage: in Block: [ :repo | ^ repo getOrCreateIcebergRepository ] BlockClosure>>cull: [ :each | (aBlock value: each) ifTrue: [ ^ foundBlock cull: each ] ] in Array(Collection)>>detect:ifFound:ifNone: in Block: [ :each | ... Array(SequenceableCollection)>>do: Array(Collection)>>detect:ifFound:ifNone: Array(Collection)>>detect:ifFound: [ :class | existingRepositories detect: [ :repo | repo isKindOf: class ] ifFound: [ :repo | ^ repo getOrCreateIcebergRepository ] ] in Iceberg class>>repositoryForPackage: in Block: [ :class | ... Array(SequenceableCollection)>>do: Iceberg class>>repositoryForPackage: RPackage>>iceRepository Iceberg class>>update UndefinedObject>>DoIt

jecisc commented 8 years ago

Same when I try to set a new repository.

npasserini commented 8 years ago

@jecisc Would you test this again and tell me if it still happens?

jecisc commented 8 years ago

@npasserini I get this:

WindowsStore(FileSystemStore)>>signalFileDoesNotExist: [ self signalFileDoesNotExist: aPath ] in WindowsStore(FileSystemStore)>>size: in Block: [ self signalFileDoesNotExist: aPath ] True>>ifTrue:ifFalse: WindowsStore(DiskStore)>>nodeAt:ifPresent:ifAbsent: WindowsStore(FileSystemStore)>>size: FileSystem>>size: FileReference>>size ByteString(SequenceableCollection)>>copyReplaceFrom:to:with: ByteString(SequenceableCollection)>>, IceMCGitRepository>>validate IceRepository>>repository: IceRepository>>createRepository IceRepository>>ensureLocalRepository IceRepository>>register [ (IceRepository origin: self scpUrl) branchName: self projectVersion; subdirectory: self repoPath; register; yourself ] in MCGitHubRepository>>getOrCreateIcebergRepository in Block: [ (IceRepository origin: self scpUrl)... OrderedCollection(Collection)>>detect:ifFound:ifNone: OrderedCollection(Collection)>>detect:ifNone: MCGitHubRepository>>getOrCreateIcebergRepository [ :repo | ^ repo getOrCreateIcebergRepository ] in [ :class | existingRepositories detect: [ :repo | repo isKindOf: class ] ifFound: [ :repo | ^ repo getOrCreateIcebergRepository ] ] in Iceberg class>>repositoryForPackage: in Block: [ :repo | ^ repo getOrCreateIcebergRepository ] BlockClosure>>cull: [ :each | (aBlock value: each) ifTrue: [ ^ foundBlock cull: each ] ] in Array(Collection)>>detect:ifFound:ifNone: in Block: [ :each | ... Array(SequenceableCollection)>>do: Array(Collection)>>detect:ifFound:ifNone: Array(Collection)>>detect:ifFound: [ :class | existingRepositories detect: [ :repo | repo isKindOf: class ] ifFound: [ :repo | ^ repo getOrCreateIcebergRepository ] ] in Iceberg class>>repositoryForPackage: in Block: [ :class | ... Array(SequenceableCollection)>>do: Iceberg class>>repositoryForPackage: RPackage>>iceRepository [ :class | class package iceRepository pull ] in Iceberg class>>update in Block: [ :class | class package iceRepository pull ] Array(SequenceableCollection)>>do:

jecisc commented 8 years ago

Maybe this is the same bug I got with github-cache. I had to move it to the root because in windows max name length it 250bytes. But I'm not sure because icebarg-cache/npasserini is empty while github-cache only missed the too long files.

jecisc commented 8 years ago

I got the error doing Iceberg update

jecisc commented 8 years ago

Same error when I try to create a new repository.

jecisc commented 8 years ago

But I can add a local repository.

jecisc commented 8 years ago

@npasserini I git the same error of Windows when I try to load any project with Metacello if I don't disable Iceberg's Metacello integration now. File does not exist.

dalehenrich commented 8 years ago

I added a dev_win-hack branch to Metacello because of the path length limit issue on Windows -- the trick was to shorten the names of the method files that cause the violation ... If Iceberg has some long filenames, then that could be the issue ... the other trick that might be necessary is to ensure that the git repos get installed as near to the root of the filesystem as possible to avoid path name limitations.

For the GsDevkit_home project I have folks install Github for Windows as well, but that's mainly for getting sane command-line git support on windows ...

jecisc commented 7 years ago

I tried again to update Iceberg via the "update" command and got this now:

LGit_GIT_EEXISTS: Failed to stat file 'C:/Users/JeCisC/AppData/Roaming/Pharo/images/Pharo 6.0 (beta)-03/pharo-local/iceberg/pharo-vcs/libgit2-pharo-bindings/LibGit-Core.package/LGitCommitBuilder.class/instance/commit_create.repo.update_ref.author.committer.message_encoding.message.tree.parent_count.parents..st': La zone de données passée à un appel système est insuffisante.

estebanlm commented 7 years ago

yes, I was seeing this: https://support.microsoft.com/en-us/help/249721/error-message-data-area-passed-to-a-system-call-is-too-small. Is... weird. Nevertheless iceberg loads fine on windows for me (and for others that are testing). The problem is when cloning Pharo itself (I guess because of its size)

jecisc commented 6 years ago

I think this issue is too old and now there is tonel for long names.