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

Inconsistent framework exclusion in paket.dependencies #1093

Closed
konste opened this issue Sep 28, 2015 · 30 comments
Closed

Inconsistent framework exclusion in paket.dependencies #1093

konste opened this issue Sep 28, 2015 · 30 comments
Labels

Comments

@konste
Copy link
Contributor

konste commented Sep 28, 2015

Consider this scenario: we target NET45 and nothing else. To indicate that fact we put "framework: net45" at the top of paket.dependencies, which in my understanding supposed to work the same as adding "framework: net45" to each package. Still we get this in the paket.lock:
ZendeskApi_v2 (3.0.2)
AsyncCTP - framework: >= net40

Package ZendeskApi_v2 depends on AsyncCTP ONLY for net40 and the fact that we get it for net45 actually causes build break, because AsyncCTP cannot be used with net45.

After vigorous pounding my head against the wall I found the workaround:
nuget ZendeskApi_v2 3.0.2 framework: >= net45
with that AsyncCTP does not get wired up to the project.

But WHY framework: >= net45 works better (or even differently) than framework: net45 is a mystery which keeps me awake at night. Could somebody please shed some light onto what is going on here?

@forki
Copy link
Member

forki commented Sep 28, 2015

I assume the bug is the code that tries to minimize the dependency
requirements. Will try to reproduce
On Sep 28, 2015 05:23, "konste" notifications@github.com wrote:

Consider this scenario: we target NET45 and nothing else. To indicate that
fact we put "framework: net45" at the top of paket.dependencies, which in
my understanding supposed to work the same as adding "framework: net45" to
each package. Still we get this in the paket.lock:
ZendeskApi_v2 (3.0.2)
AsyncCTP - framework: >= net40

Package ZendeskApi_v2 depends on AsyncCTP ONLY for net40 and the fact that
we get it for net45 actually causes build break, because AsyncCTP cannot be
used with net45.

After vigorous pounding my head against the wall I found the workaround:
nuget ZendeskApi_v2 3.0.2 framework: >= net45
with that AsyncCTP does not get wired up to the project.

But WHY framework: >= net45 works better (or even differently) than
framework: net45 is a mystery which keeps me awake at night. Could somebody
please shed some light onto what is going on here?


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

@forki forki added the bug label Sep 28, 2015
@forki
Copy link
Member

forki commented Sep 28, 2015

confirmed. it's a bug

@forki forki closed this as completed in bf19b24 Sep 28, 2015
@konste
Copy link
Contributor Author

konste commented Sep 28, 2015

Thanks a lot for speedy fix! I can sleep again ;-)

@forki
Copy link
Member

forki commented Sep 28, 2015

Fix is not completely ready, but should already solve your use case. Can
you please confirm?
On Sep 28, 2015 1:55 PM, "konste" notifications@github.com wrote:

Thanks a lot for speedy fix! I can sleep again ;-)


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

@konste
Copy link
Contributor Author

konste commented Sep 28, 2015

On it...

@forki
Copy link
Member

forki commented Sep 28, 2015

just found another related bug.

wait a minute

@konste
Copy link
Contributor Author

konste commented Sep 28, 2015

I will wait for the next version, but just FYI 2.4.2 does not resolve my case. Struggling with GitHub to attach relevant repro files.

@konste
Copy link
Contributor Author

konste commented Sep 28, 2015

Shared files in OneDrive folder here: http://1drv.ms/1O4Ttig

@forki forki reopened this Sep 28, 2015
@forki forki closed this as completed in 8a24998 Sep 28, 2015
@forki
Copy link
Member

forki commented Sep 28, 2015

so fixed the second bug. please try again. sorry for the ping pong

@konste
Copy link
Contributor Author

konste commented Sep 28, 2015

Nope, still does not work. Resulting paket.lock.2.4.3.txt shared in the same folder.

@konste
Copy link
Contributor Author

konste commented Sep 28, 2015

Critical part is this:
ZendeskApi_v2 (3.0.2) - framework: >= net45
AsyncCTP - framework: >= net40
but a few other parts look weird:
Antlr (3.5.0.2) - framework: net45, net45, net45, net40, >= net45, >= net451
or this:
Newtonsoft.Json (>= 6.0.4) - framework: portable-net45+wp80+wpa81+win, >= net40, >= net45

@konste
Copy link
Contributor Author

konste commented Sep 28, 2015

I prefer ping pong to "Chess by snail mail" ;-)

@forki
Copy link
Member

forki commented Sep 28, 2015

are you sure you did the "paket update" with 2.4.3? I don't get AsyncCTP in the lock file any more.

@forki
Copy link
Member

forki commented Sep 28, 2015

please try "paket update -f" maybe it's cache related

@forki
Copy link
Member

forki commented Sep 28, 2015

btw: you don't need to add the nuget v3 feed, Paket is automatically detecting this feed when you have the v2 enabled.

@konste
Copy link
Contributor Author

konste commented Sep 28, 2015

v3 feed removed.
With "update" the bug is indeed fixed, although I must admit I lost my understanding of the difference between Install and Update. I thought if I don't want to move package versions forward I don't need Update.
Folder http://1drv.ms/1O4Ttig updated.
Still weird cases when irrelevant frameworks are pulled in remain.

@forki
Copy link
Member

forki commented Sep 28, 2015

yes usually an "install" is enough, but in this case you want to skip all the previous buggy logic from the cache.

I'm working on further optimizations.

@forki forki reopened this Sep 28, 2015
@forki forki closed this as completed in e05c507 Sep 28, 2015
@forki
Copy link
Member

forki commented Sep 28, 2015

please retry a paket update. grouping should be much better now.

@forki
Copy link
Member

forki commented Sep 28, 2015

shit. it's still not good.

@forki forki reopened this Sep 28, 2015
@konste
Copy link
Contributor Author

konste commented Sep 28, 2015

Don't rush it - my case is admittedly hard. Very well may serve as a comprehensive test in the future :-)

@forki forki closed this as completed in 4ced7e9 Sep 28, 2015
@forki
Copy link
Member

forki commented Sep 28, 2015

ok now it loks pretty. hope it fixes your case now.

@konste
Copy link
Contributor Author

konste commented Sep 28, 2015

Oh no! It got pretty indeed, but it regressed and the problem which started it all is back:

ZendeskApi_v2 (3.0.2) - framework: >= net45
AsyncCTP - framework: >= net40

@konste
Copy link
Contributor Author

konste commented Sep 28, 2015

Wait, I could be wrong...

@forki
Copy link
Member

forki commented Sep 28, 2015

are you sure? it doesn't come back for me

2015-09-28 18:02 GMT+02:00 konste notifications@github.com:

Oh no! It got pretty indeed, but it regressed and the problem which
started it all is back:

ZendeskApi_v2 (3.0.2) - framework: >= net45
AsyncCTP - framework: >= net40


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

@konste
Copy link
Contributor Author

konste commented Sep 28, 2015

It looks like ".paket\paket update -f" fixed it. "-f" appeared to be the flag which made the difference.
Phew... Keep it as a test against regressions. Actually, I will let you know if it regresses :-)

@konste
Copy link
Contributor Author

konste commented Sep 28, 2015

Thank you for a great and winning push!!

@forki
Copy link
Member

forki commented Sep 28, 2015

I think I have some great news for you for the next version. your case made
me fix a perf issue that I didn't find before. so stay tuned ;-)

2015-09-28 18:10 GMT+02:00 konste notifications@github.com:

Thank you for a great and winning push!!


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

@forki
Copy link
Member

forki commented Sep 29, 2015

first results are coming in. 2.5.0-alpha002 is 4.2x faster on your dependencies file than 2.4.0

@konste
Copy link
Contributor Author

konste commented Sep 29, 2015

Faster on which operations?

@forki
Copy link
Member

forki commented Sep 29, 2015

update, install

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