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

[Ready] Fix/refactor/improve framework restriction system, add performance metrics and pre-load requests #2336

Merged
merged 49 commits into from May 25, 2017

Conversation

Projects
None yet
2 participants
@matthid
Member

matthid commented May 13, 2017

start fixing #2317 because #2333 shows that its relevant.

Changes:

  • Remove all magic version strings
  • Restrictions can now be as complex as wanted - the simplifier almost always makes them look as "simple" as before
  • Changed Syntax in Lockfile from "Framework: " to "Restriction: " in order to be backwards compatible and allow new syntax (see below).
  • Restrictions now work nicely in combination with Portable profiles
  • Removed a various amount of hacks
  • Remove support for V4_Client -> if complains come up we need to find a general solution as -client and -full exists for all framework versions
  • Adds a performance overview.

TODO:

  • Fix tests (part of #2356)
  • Performance
  • Lots of Json Exceptions seem to happen in the background...
  • Write parser for the new syntax
  • Is Syntax OK?

Example:

NUGET
  remote: https://www.nuget.org/api/v2
    CommonServiceLocator (1.3) - restriction: || (== sl5) (>= net40) (>= portable-net45+monoandroid+xamarinios+win8+wp8+wpa81)
    MvvmLightLibs (5.2)
      CommonServiceLocator (>= 1.0) - restriction: || (== net35) (== sl4)
      CommonServiceLocator (>= 1.3) - restriction: || (== sl5) (>= net40) (>= portable-net45+monoandroid+xamarinios+win8+wp8+wpa81)

The general syntax is

  • OP (operand1) (operand2) ... for ||, NOT and && and
  • OP tfm for ==, >= and <.
  • operandN itself can be a operator again, for example || (&& (>= net3) (< net4)) (== sl4)

Future Work:

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki May 14, 2017

Member
Member

forki commented May 14, 2017

@matthid

This comment has been minimized.

Show comment
Hide comment
@matthid

matthid May 14, 2017

Member

I don't think I can finish this in the next days, it will be quite invasive in the code base (and remove so many hacks that it might hurt). These changes just show the direction it's going.... For now, I just demonstrate how the low-level code is currently broken (and quite a lot of code sits on top of this)

Member

matthid commented May 14, 2017

I don't think I can finish this in the next days, it will be quite invasive in the code base (and remove so many hacks that it might hurt). These changes just show the direction it's going.... For now, I just demonstrate how the low-level code is currently broken (and quite a lot of code sits on top of this)

matthid added some commits May 14, 2017

parsing nuspec is a bit more complicated than expected. We properly n…
…eed to detect the group restrictions in a future compatible way.
make sure formulars are always in dnf (which makes writing the simpli…
…fier easier and only generated 'simple' formulas).
refactor FrameworkIdentifier, remove V4_Client (if still needed we ne…
…ed to solve it for all version). Remove magic strings (not finished jet)
@matthid

This comment has been minimized.

Show comment
Hide comment
@matthid

matthid May 22, 2017

Member

I think this is ready for review. Note that integration-tests probably need to be adapted, but I need some days break from this. If one of you wants to finish this let me know (like I said I think its just fixing the tests). Unittest-suite is green already. See my edited first post for more info.
/cc @cloudRoutine @forki

Member

matthid commented May 22, 2017

I think this is ready for review. Note that integration-tests probably need to be adapted, but I need some days break from this. If one of you wants to finish this let me know (like I said I think its just fixing the tests). Unittest-suite is green already. See my edited first post for more info.
/cc @cloudRoutine @forki

matthid added some commits May 23, 2017

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki May 23, 2017

Member

files changed: 80 +2,601 −1,895
ouch

Member

forki commented May 23, 2017

files changed: 80 +2,601 −1,895
ouch

matthid added some commits May 23, 2017

matthid added some commits May 23, 2017

Change Profile-Code to work in parallel and thread changing environme…
…nts. Push Async down into the resolver to make the resolver aware that these are costly.

@matthid matthid changed the title from [Ready for Review] Fix/refactor/improve framework restriction system to [Ready for Review] Fix/refactor/improve framework restriction system, add performance metrics and pre-load requests May 24, 2017

@matthid matthid changed the title from [Ready for Review] Fix/refactor/improve framework restriction system, add performance metrics and pre-load requests to [Ready] Fix/refactor/improve framework restriction system, add performance metrics and pre-load requests May 24, 2017

@matthid

This comment has been minimized.

Show comment
Hide comment
@matthid

matthid May 24, 2017

Member

I can try to merge and release tomorrow.

Member

matthid commented May 24, 2017

I can try to merge and release tomorrow.

@matthid matthid merged commit e817322 into master May 25, 2017

4 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@matthid matthid deleted the fix_restrictions branch May 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment