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.template - file type doesn't respect dir without slash at the end #698

Closed
theimowski opened this issue Mar 12, 2015 · 15 comments
Closed

Comments

@theimowski
Copy link
Member

type file
id xxx
version 1.0
authors xxx
description
        description of this test package
files
    bin/Debug/ ==> lib

bin/Debug doesn't work
bin/Debug/ works

/cc @mavnn

@forki
Copy link
Member

forki commented Mar 12, 2015

ok this one is my fault. I changed that to FAKE's globbing. and the behaviour is already in FAKE.

Could you try to find a workaround around https://github.com/fsprojects/Paket/blob/master/src/Paket.Core/TemplateFile.fs#L328?

we might even discuss changes to the globbing in FAKE
// @colinbull

forki added a commit that referenced this issue Mar 12, 2015
@forki
Copy link
Member

forki commented Mar 12, 2015

I wonder if it really copies the whole directory including subdirectories.

@theimowski
Copy link
Member Author

In my case it did

@forki
Copy link
Member

forki commented Mar 12, 2015

Ok then I think it should go upstream into FAKE

@forki
Copy link
Member

forki commented Mar 12, 2015

It already annoyed some people there

@theimowski
Copy link
Member Author

Go for It

@colinbull
Copy link
Contributor

There is a slight subtly here, when we have the trailing slash this allows the globbing implementation to figure out that it is a directory so something like bin\Debug\ will be turned into the following search tokens, [Directory(bin); Directory(Debug)]. Now if we don't have a the trailing slash we get [Directory(bin); Filename(Debug)], this is supports extension-less files. Now considering how rare they I could just test to see if the last token has an extension and emit the correct token. What do you think?

@forki
Copy link
Member

forki commented Mar 12, 2015

Please take a look at 07a0b07
and fsprojects/FAKE@8f83457 - I thought the if Directory.Exists would handle this?

@colinbull
Copy link
Contributor

This causes a fair few test failures. I have added some failing tests and a fix colinbull/FAKE@e3eb041 sent you a PR.

@forki
Copy link
Member

forki commented Mar 12, 2015

yep. just reverted that thing. It's not correct. And the workarounf Paket will also fail on wildcards ;-(

forki added a commit that referenced this issue Mar 12, 2015
@theimowski
Copy link
Member Author

Should we revert then?

@forki
Copy link
Member

forki commented Mar 12, 2015

could you please try with 0.33.15 - it uses colin's stuff from FAKE

@theimowski
Copy link
Member Author

works fine, thanks

@colinbull
Copy link
Contributor

Good too hear 👍

@forki
Copy link
Member

forki commented Mar 12, 2015

with 57a4455#diff-5850744305c961bd47fb58bd09062c26R329 applied it seems to work even for complicated stuff like: fsprojects/FsReveal@18fcad5#diff-38a9089c5d441003f1b29b8880065f07R15

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