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: Duplicate files being archived when specified multiple times in templates #851

Closed
eiriktsarpalis opened this issue Jun 1, 2015 · 7 comments
Labels

Comments

@eiriktsarpalis
Copy link
Member

I came across an issue where files being specified more than once result in the same file being included multiple times in the nupkg archive. The behaviour can be reproduced using this commit. For instance, In FsPickler.fsproj, the paket template contains the following declarations:

type project
id FsPickler
...
files
    ../../bin/FsPickler.dll ==> lib/net45
    ../../bin/FsPickler.pdb ==> lib/net45
    ../../bin/FsPickler.xml ==> lib/net45
    ../../bin/net40/FsPickler.dll ==> lib/net40
    ../../bin/net40/FsPickler.pdb ==> lib/net40
    ../../bin/net40/FsPickler.xml ==> lib/net40

This will cause the net45 FsPickler.dll to be bundled twice, but not the same for net40.
screen shot 2015-06-01 at 15 45 54
The obvious fix here would be to omit the net45 declarations, but I would prefer the explicitness of the current version.

Taking this issue to the extreme, it is possible to do the following:

files
    ../../bin/FsPickler.dll ==> lib/net45
    ../../bin/FsPickler.dll ==> lib/net45
    ../../bin/FsPickler.dll ==> lib/net45
    ../../bin/FsPickler.dll ==> lib/net45
    ../../bin/FsPickler.dll ==> lib/net45

which yields the following result:
screen shot 2015-06-01 at 15 50 44

@forki forki added the bug label Jun 1, 2015
@forki forki closed this as completed in 4e2547a Jun 1, 2015
@forki
Copy link
Member

forki commented Jun 1, 2015

4e2547a should do the trick

@eiriktsarpalis
Copy link
Member Author

Hmm, the problem still reproduces with 1.9.2.

@forki forki reopened this Jun 1, 2015
@forki
Copy link
Member

forki commented Jun 1, 2015

ah found another thingy

@forki forki closed this as completed in 0611c82 Jun 1, 2015
@forki
Copy link
Member

forki commented Jun 1, 2015

could you please try 1.9.3 - looks good for me

@eiriktsarpalis
Copy link
Member Author

It seems to be working, however now the net40 files have disappeared from the archive - as if the files in the template are being completely ignored.

@forki forki reopened this Jun 1, 2015
@forki
Copy link
Member

forki commented Jun 1, 2015

after running build.fsx PaketNugeton your branch and unzipping I see:

image

image

image

image

LGTM

@eiriktsarpalis
Copy link
Member Author

Ok, so I ran clean/reset in my local repo and everything seems to be working fine. Thanks!

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

No branches or pull requests

2 participants