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

[WIP] Move the dependencies over to props during VS Background build #3273

Merged
merged 24 commits into from Jul 6, 2018

Conversation

Projects
None yet
4 participants
@forki
Copy link
Member

forki commented Jun 29, 2018

references #3270

We already create a *.csproj.paket.props file in /obj in order to put CliReferences there. Here we dump the PackageReferences there as well (only when we are in background build). VS is watching the file and triggers restore/resolution.

Condition="$(DesignTimeBuild) != true 

For rider and ionide we would need such properties as well.

@forki

This comment has been minimized.

Copy link
Member Author

forki commented Jun 29, 2018

@matthid there is one known issue. for the very first build after paket updated itself we have a caching problem. the heuristic will think everything is up-to-date and won't call paket and therefor the props file won't change. but it will also no longer add the deps in memory. any ideas how to invalidate the restore cache?

let newContent = old.Replace("<!-- <RestoreSuccess>False</RestoreSuccess> -->","<RestoreSuccess>False</RestoreSuccess>")
File.WriteAllText(paketPropsFile.FullName, newContent)
let assetsFile = ProjectFile.getAssetsFileInfo projectFileInfo
if assetsFile.Exists then

This comment has been minimized.

@forki

forki Jun 29, 2018

Author Member

@Krzysztof-Cieslak @enricosada I'm not sure if this will break the ionide integration. FSAuto was watching the assets file, right? does it watch the props files?

@forki forki changed the title Move the dependencies over to props during VS Background build [WIP] Move the dependencies over to props during VS Background build Jun 29, 2018

@matthid

This comment has been minimized.

Copy link
Member

matthid commented Jun 29, 2018

for the very first build after paket updated itself we have a caching problem.

paket updated itself? what? You mean after paket update?

the heuristic will think everything is up-to-date

It should be up-to-date after paket update?

@forki

This comment has been minimized.

Copy link
Member Author

forki commented Jun 29, 2018

no I mean after magic mode updates paket.exe and the targets file

@matthid

This comment has been minimized.

Copy link
Member

matthid commented Jun 29, 2018

updates paket.exe and the targets file

And why does that matter for the cache? Are we dynamically rewriting the targets file?

@forki

This comment has been minimized.

Copy link
Member Author

forki commented Jun 29, 2018

@matthid

This comment has been minimized.

Copy link
Member

matthid commented Jun 29, 2018

Ok then maybe we should stop doing that ;)

@forki forki closed this Jun 29, 2018

@forki forki reopened this Jun 29, 2018

[yield sprintf " <ItemGroup Condition=\"($(DesignTimeBuild) == true)%s\">" condition
yield! packageReferences
yield " </ItemGroup>"])
|> fun xs -> String.Join(Environment.NewLine,xs)

This comment has been minimized.

@teo-tsirpanis

teo-tsirpanis Jun 29, 2018

Do you know that there is a String.concat library routine?

This comment has been minimized.

@forki

forki Jun 29, 2018

Author Member

Yes, but what would that improve?

This comment has been minimized.

@teo-tsirpanis

teo-tsirpanis Jun 30, 2018

Well, nothing actually. 😁 Just to avoid the lambda. I used to not know about the curried version in the past.

@forki forki merged commit 5f17139 into master Jul 6, 2018

1 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/branch AppVeyor build failed
Details
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.