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

Paket Pack builds bad pakage when specifying relative target path external to package directory. #1472

Closed
galaxystar opened this issue Feb 13, 2016 · 14 comments

Comments

@galaxystar
Copy link

@galaxystar galaxystar commented Feb 13, 2016

Paket 2.50.6.0, 3.0.0.40-alpha. Running on Mac.

When I use a target path that is external (and non absolute) to a directory outside of the /packages/group/ directory it results in duplicate files, where the duplicate files are at the wrong path.

I'm using relative paths because I want the install/update for some of my packages to be deployed somewhere other than the packages directory. I know it's an atypical approach but it should still be an approach that is supported.

When I list the files in the package using unzip -l mypackage.1.0.3.nupkg:

Archive:  mypackage.1.0.3.nupkg
  Length     Date   Time    Name
 --------    ----   ----    ----
    16545  02-12-16 17:26   ../../../Assets/Packages/mypackage/Editor/Users/buildcomputer/jenkins/nodes/unitySlave/workspace/<jenkins_job>/Assets/file1.cs   (WRONG!!!)
      262  02-12-16 17:26   ../../../Assets/Packages/mypackage/Editor/Users/buildcomputer/jenkins/nodes/unitySlave/workspace/<jenkins_job>/Assets/file1.cs.meta  (WRONG!!!)
    16545  02-12-16 17:26   ../../../Assets/Packages/mypackage/Editor/file1.cs   (CORRECT)
      262  02-12-16 17:26   ../../../Assets/Packages/mypackage/Editor/file1.cs.meta    (CORRECT)
      533  02-12-16 17:26   mypackage.nuspec
      669  02-12-16 17:26   package/services/metadata/core-properties/coreProp.psmdcp
      489  02-12-16 17:26   _rels/.rels
      541  02-12-16 17:26   [Content_Types].xml
 --------                   -------

A couple things to note:

  1. There are duplicates (file1.cs and file1.cs.meta) show up twice in two different paths. The wrong paths have been denoted above with (WRONG!!!!).
  2. The wrong files seem to contain a near absolute path, but does not actually contain the full path either. Namely, it's missing the "Editor" folder.

My project.template file

type file
copyright My Company 2016
id mypackage
version 1.0.3
authors 
    me
projectUrl 
    http://mypackage.com
description
    my description
files
    Assets/Editor/** ==> ../../../Assets/Packages/mypackage/Editor/
@forki
Copy link
Member

@forki forki commented Feb 13, 2016

I can't really reproduce, but please try latest version. I changed something that might be related

@forki forki added the needs-repro label Feb 14, 2016
@flowsprenger
Copy link
Contributor

@flowsprenger flowsprenger commented Feb 15, 2016

globbing from 2.50.7 seems to be somewhat broken:

this is a reproducible case:
https://gist.github.com/flowsprenger/8280a7f0f2cf5f64b8b1

it probably does not cover all cases, i see the paket.template being packaged too in the project i am currently working on, but i don't have a simple reproducible case as of now

@forki
Copy link
Member

@forki forki commented Feb 15, 2016

We changed pack in 2.50.9 - can you please try with that version?

@flowsprenger
Copy link
Contributor

@flowsprenger flowsprenger commented Feb 15, 2016

I did, the output is from 2.50.9. 2.50.6 is the last that works fine.

@forki
Copy link
Member

@forki forki commented Feb 15, 2016

so I revert 3fcac1d and await a repro from @galaxystar!?

@flowsprenger
Copy link
Contributor

@flowsprenger flowsprenger commented Feb 15, 2016

Sounds reasonable to me. Alternatively I can pin Paket's version again, seems we need a mechanism to do this over all our repos anyway.

forki added a commit that referenced this issue Feb 15, 2016
This reverts commit 3fcac1d.

Conflicts:
	RELEASE_NOTES.md
@forki
Copy link
Member

@forki forki commented Feb 15, 2016

@flowsprenger please try latest

@flowsprenger
Copy link
Contributor

@flowsprenger flowsprenger commented Feb 15, 2016

@forki works again :)

@forki
Copy link
Member

@forki forki commented Feb 15, 2016

Would be great if you could contribute your repro as an integration test so
that we don't break it again
On Feb 15, 2016 12:00 PM, "Florian Sprenger" notifications@github.com
wrote:

@forki https://github.com/forki works again :)


Reply to this email directly or view it on GitHub
#1472 (comment).

@flowsprenger
Copy link
Contributor

@flowsprenger flowsprenger commented Feb 15, 2016

@galaxystar since you seem to use unity, maybe its worth having a look at https://github.com/wooga/Paket.Unity3D/ which allows to install using paket.unity3.exe and paket.unity3d.reference files.

@forki alright, shall have a look at how to do that

@forki
Copy link
Member

@forki forki commented Feb 15, 2016

thx would be of great help

@galaxystar
Copy link
Author

@galaxystar galaxystar commented Feb 16, 2016

@forki I just tried 2.50.10 with the same (wrong) results. I have a temp work around (using zip -d to remove the files with the erroneous directory). It's not ideal, but it works in the short term for this special case.

@flowsprenger I looked into Paket.Unity3D. It seems to be abandoned. No forks, no changes in 6 months, 5 issues, most of which were unaddressed and their mono build seems to be failing. I'd prefer to stick with vanilla Paket as it seems to do everything I need it to and gives me the flexibility to swap packages in/out as I see fit (such as when switching platforms).

@forki
Copy link
Member

@forki forki commented Feb 16, 2016

I'm not near a pc for 2 weeks but if you can come up with a repro I'll try
to address when I'm back.
On Feb 16, 2016 23:22, "galaxystar" notifications@github.com wrote:

@forki https://github.com/forki I just tried 2.50.10 with the same
(wrong) results. I have a temp work around (using zip -d to remove the
files with the erroneous directory). It's not ideal, but it works in the
short term for this special case.

@flowsprenger https://github.com/flowsprenger I looked into
Paket.Unity3D. It seems to be abandoned. No forks, no changes in 6 months,
5 issues, most of which were unaddressed and their mono build seems to be
failing. I'd prefer to stick with vanilla Paket as it seems to do
everything I need it to and gives me the flexibility to swap packages
in/out as I see fit (such as when switching platforms).


Reply to this email directly or view it on GitHub
#1472 (comment).

@galaxystar
Copy link
Author

@galaxystar galaxystar commented Feb 17, 2016

I just tried with 2.50.10 and it worked locally, but gave me problems on my build machine. I then went through the full installation process for Mac (downloaded repository and installed using the install script) and it worked correctly. I must have had some frankenstein installation through my manual installation process. Thanks for all the help, I really appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants