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

forki
Copy link
Member

@forki 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
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
Copy link
Member Author

Choose a reason for hiding this comment

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

@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
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
Copy link
Member Author

forki commented Jun 29, 2018

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

@matthid
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
Copy link
Member Author

forki commented Jun 29, 2018 via email

@matthid
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)
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but what would that improve?

Copy link
Contributor

@teo-tsirpanis teo-tsirpanis Jun 30, 2018

Choose a reason for hiding this comment

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

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

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.

None yet

4 participants