Skip to content

Fix 2222 - improve output of the outdated warning and fix underlying bug - #2223

Merged
forki merged 8 commits into
fsprojects:masterfrom
matthid:fix_annoying_warning_2222
Apr 9, 2017
Merged

forki merged 8 commits into
fsprojects:masterfrom
matthid:fix_annoying_warning_2222

Conversation

@matthid

@matthid matthid commented Apr 9, 2017 •

Copy link
Copy Markdown
Member

fixes both issues in #2222.

Before

paket.dependencies and paket.lock are out of sync in C:\PROJ\FAKE.
Please run 'paket install' or 'paket update' to recompute the paket.lock file.

After

paket.dependencies and paket.lock are out of sync in C:\PROJ\FAKE.
Please run 'paket install' or 'paket update' to recompute the paket.lock file.
Changes [RestrictionsChanged] were detected in netcore/FSharp.Compiler.Service
Changes [RestrictionsChanged] were detected in netcore/FSharp.Core
Changes [RestrictionsChanged] were detected in netcore/Libuv
Changes [RestrictionsChanged] were detected in netcore/Microsoft.CodeAnalysis.Common
Changes [RestrictionsChanged] were detected in netcore/Microsoft.CodeAnalysis.CSharp
Changes [RestrictionsChanged] were detected in netcore/Microsoft.CodeAnalysis.VisualBasic
Changes [RestrictionsChanged] were detected in netcore/Microsoft.CSharp
Changes [RestrictionsChanged] were detected in netcore/Microsoft.DiaSymReader
Changes [RestrictionsChanged] were detected in netcore/Microsoft.DiaSymReader.PortablePdb
Changes [RestrictionsChanged] were detected in netcore/Microsoft.NETCore.App
Changes [RestrictionsChanged] were detected in netcore/Microsoft.NETCore.DotNetHost
Changes [RestrictionsChanged] were detected in netcore/Microsoft.NETCore.DotNetHostPolicy
Changes [RestrictionsChanged] were detected in netcore/Microsoft.NETCore.DotNetHostResolver
Changes [RestrictionsChanged] were detected in netcore/Microsoft.NETCore.Jit
Changes [RestrictionsChan...

@matthid

matthid commented Apr 9, 2017

Copy link
Copy Markdown
Member Author

apparently the problem was that paket could not properly parse netcore10 (which it wrote itself).

@matthid matthid changed the title WIP fix 2222 - improve output of the outdated warning and fix underlying bug Fix 2222 - improve output of the outdated warning and fix underlying bug Apr 9, 2017
@matthid

matthid commented Apr 9, 2017

Copy link
Copy Markdown
Member Author

Lets see what the CI has to say :)

let rec step (stage:Stage) (stackpack:StackPack) compatibleVersions (flags:StepFlags) =

let fuseConflicts currentConflict priorConflictSteps =
let inline fuseConflicts currentConflict priorConflictSteps =

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cloudRoutine Is this OK? This prevents a stack-overflow I had when debugging (compiling in DEBUG mode)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting. probably just because the stack size was halved due to inlining. but I'm fine with that!

@matthid matthid Apr 9, 2017 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okey, I thought the thing is now tail recursive but the compiler is not picking it up because of debug mode. Thanks for the clarification.

| "netcore10" | "netcoreapp10" -> Some (DotNetCore DotNetCoreVersion.V1_0)
| "netcore11" | "netcoreapp11" -> Some (DotNetCore DotNetCoreVersion.V1_1)
| "netcore10" -> Some (DotNetCore DotNetCoreVersion.V1_0)
| "netcore11" -> Some (DotNetCore DotNetCoreVersion.V1_1)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This is in fact cleanup as we have the netcoreapp -> netcore alias defined above.

if hasAnyChanges then
checkResponse "paket.dependencies and paket.lock are out of sync in %s.%sPlease run 'paket install' or 'paket update' to recompute the paket.lock file." lockFileName.Directory.FullName Environment.NewLine
for (group, package, changes) in nugetChanges do
traceWarnfn "Changes %A were detected in %s/%s" changes (group.ToString()) (package.ToString())

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generating a really nice output is left as an exercise to the reader :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah we can iterate on that

@matthid

matthid commented Apr 9, 2017

Copy link
Copy Markdown
Member Author

OK This is ready. The AppVeyor error is unrelated and on the master branch as well.

Comment thread src/Paket/Paket.fsproj
<StartWorkingDirectory>C:\dev\src\Paket\integrationtests\scenarios\loading-scripts\dependencies-file-flag\temp</StartWorkingDirectory>
<StartArguments>install --createnewbindingfiles</StartArguments>
<StartWorkingDirectory>D:\temp\pakkit2</StartWorkingDirectory>
<StartArguments>install</StartArguments>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wished this would be in different file so that we could gitignore.

@matthid matthid Apr 9, 2017 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can remove that change if you want.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe after @Krzysztof-Cieslak brings the toml file ;)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no it's fine. It's more a general observation. I'm really annoyed about that part of fsproj

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah not sure if MSbuild 15 is better in that regard. but VS can't read it anyways ;-)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well maybe we soon use all VSCode with ionide (when the full .net debugger works) and we don't have this problem anymore (because VSCode uses its own json files for debugging?)

@forki

forki commented Apr 9, 2017

Copy link
Copy Markdown
Member

Good work! Thanks a lot

@forki
forki merged commit 6cb4a35 into fsprojects:master Apr 9, 2017
let item = operatorSplit.[3]
match FrameworkDetection.Extract(item) with
| None ->
handleError <| sprintf "Could not parse second framework of between operator '%s'. Try to update or install again or report a paket bug." item

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@forki Just in case I cannot react fast enough and people are experiencing failures tomorrow: We can just set failImmediatly to false within the parseRestrictions function (as first operation, essentially ignoring the parameter). This way paket will log errors instead of failing directly. But more often than not this indicates a bug somewhere...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good thanks for the warning.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I should revert the change, push a bug fix version with old code and publish this as minor version change?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a new feature, I have not met a case where this actually triggered wrongly.

I encountered two cases:

  • The file was written by paket and can no longer be parsed -> paket bug (another minor increase)
  • The file was written by the user (paket.references for example in my test case) -> user error as he entered some invalid value, its just that paket never told him.

All in all I think a patch version is enough as this indeed fixes a bug (one could argue if the additional output is a new feature though...)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doing it anyways. just in case.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if something belongs into a minor release its the logic required to produce the additional output and not this part ;). But that's of IMHO.

@matthid

matthid commented Apr 9, 2017

Copy link
Copy Markdown
Member Author

Finally the warning is gone. As always thanks for merging and releasing so quickly :)

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

Successfully merging this pull request may close these issues.

2 participants