Repository navigation
Conversation
…ng a /obj/ folder in the project dir
| let scenario = "i00xxxx-obj-dir" | ||
| let tmpPaketFolder = (scenarioTempPath scenario) @@ "../.paket" | ||
| let targetsFile = FullName(__SOURCE_DIRECTORY__ + "../../../src/Paket/embedded/Paket.Restore.targets") | ||
| let paketExe = FullName(__SOURCE_DIRECTORY__ + "../../../.paket/paket.exe") |
There was a problem hiding this comment.
This is wrong (and is also wrong in the test above): it copies the checked-in version of paket, not the previously build one.
Tomorrow ...
matthid
left a comment
There was a problem hiding this comment.
just some stuff i noticed not a full review :)
| let paketExe = FullName(__SOURCE_DIRECTORY__ + "../../../bin/paket.exe") | ||
|
|
||
| setEnvironVar "PaketExePath" paketExe | ||
| prepare scenario |
There was a problem hiding this comment.
we now have a new prepareSdk function to simplify these tests :)
| <StartArguments>update</StartArguments> | ||
| <StartWorkingDirectory>C:\proj\testing\testpaketfailure\</StartWorkingDirectory> | ||
| <StartArguments>fix-nuspecs files src/Paket.Core.preview3/obj/Paket.Core.1.0.0.nuspec project-file src/Paket.Core.preview3/Paket.Core.fsproj</StartArguments> | ||
| <StartWorkingDirectory>C:\proj\Paket</StartWorkingDirectory> |
There was a problem hiding this comment.
I do this myself all the time. I don't know why vs is failing so hard here.
Ideally we would gitignore that section of this file
There was a problem hiding this comment.
yeah ... please remind me again after I remove the wip
| |> Seq.filter (fun proj -> proj.GetToolsVersion() >= 15.0) | ||
| |> Seq.iter (fun proj -> | ||
| RestoreNewSdkProject dependenciesFile lockFile resolved groups proj | ||
| let objDir = objDir |> Option.defaultValue (Path.Combine(Path.GetDirectoryName(proj.FileName),"obj")) |
There was a problem hiding this comment.
I assume this path is called if I just do "paket restore"? Then we would need to crack the project file and manually parse "$(BaseIntermediateOutputPath)". :\
|
@matthid Your performance improvements have made this a little bit harder :\ Before, paket was called each time directly from msbuild, so it was easy to just pass-through any MSBuild variables. As I understand it now, you now do an "external" restore, which is not triggered by msbuild. So I have no idea how to pass the MSBuild variables, because I really don't want to crack open and parse the project file manually. |
It is triggered on demand:
If nothing is outdated we will skip calling paket and will just read and forward the files in the |
|
If I run "paket restore", then run "dotnet restore", which of the two will write the obj\paket.referenced files? My understanding (which may be totally wrong) is:
|
|
@0x53A Yes both is correct. But if you do NOT call |
|
And that is precisely my issue: I need to pass through one variable from inside the project file, which I can't, because the restore is "external". |
|
Why? From Paket's world view restore is a global operation. I also pass properties (namely the target framework list for example...) |
|
How do you read the TFM list? What if it was not set directly in the project file, but in a directories.props? |
|
Basically this seems like a repetition of #2241, which also failed if the property was not set directly in the project file, but in an imported target/props. |
|
@0x53A That is not working sadly, because currently I used the paket internal project framework parser. |
Correct. Same problem and same code... |
|
Alternatively we make paket fast enough to always call it in msbuild. But currently when we do it paket starts to become unusable if you try to use it in a solution with more than 7 projects (at least IMHO). |
I fear that is the only reliable solution. We can still do an up-to-date check, but the first creation needs to be from inside the project (once for each TFM) so we don't need to parse the msbuild file from "outside" and instead can just read the in-memory variables. Assuming (I haven't profiled it yet) that a non-neglible part is JIT, we should guide users to NGEN paket.exe. |
I don't think that will be enough. Also we should probably find an automatic solution. Always calling NGEN manually after updates is not really a viable option oO |
|
The best option would be AOT, and then the bootstrapper can detect the system platform and download the specific version. ngen requires admin permissions, so unless the user runs us from an admin shell, we can't do it ourselves. |
|
I should have finished this earlier and added an integration test, then you would have had to deal with his :\ Sorry, I am just slightly unhappy at the moment. |
|
I'm sorry, on my defense I told you somewhere (issue or other PR that I planned to change this). |
|
Ok. so my first step would be to use the current parser (even with its known issues) to read |
|
Has this been abandoned as of now? I'd have some interest in this feature as well |
|
The issue back then was that paket did one external restore for all frameworks. It would need to do restores when called from MsBuild so it has proper access to the MsBuild variables. I do not know if anything changed in that regard. |
|
And in the forseable future I don't have much time, so I'll close this PR, sorry. If you want to work on it, then I guess the strategy would be the same - pass IntermediateOutputPath from Paket.Restore.targets to paket.exe, then route it through. |
|
Thanks @0x53A I'll give it a go |
You can redirect where nuget and the cli do their stuff, but paket currently ignores that.
This adds two more parameters: one for where the references file should be written and one for the intermediate dir.
The second one is required so paket knows where to copy the nuget.config.
The first one is not yet required - it could just write it to the intermediate directory.
But for #2606 we will need more than one file (one per configuration/tfm) so I added an explicit parameter now.