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

Fixes re-ordering problem with files #722

Merged
merged 2 commits into from
Mar 26, 2015
Merged

Conversation

colinbull
Copy link
Contributor

I have had problems in a number of projects where I have re-ordered the files in the project, for one reason or another. However when I run paket update there are certain situations where this order isn't maintained. For example,

Before running paket update
original-ordering-officeprovider-microsoft visual studio

After running paket update

afterupdate-ordering-officeprovider-microsoft visual studio

This fix prevents this re-ordering from happening by retaining the paket Compile and Content elements in place when ProjectFile.UpdateFileItems. I'm not a 100% sure this is the correct fix, but it was the most simply thing I could see to do with out changing UpdateFiles significantly.

@@ -129,8 129,6 @@ type ProjectFile =
node.ParentNode.RemoveChild(node) |> ignore

member this.UpdateFileItems(fileItems : FileItem list, hard) =
this.DeletePaketNodes("Compile")
Copy link
Member

Choose a reason for hiding this comment

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

we would never deinstall thing if we don't delete.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Humm, So the InstallProcess.InstallIntoProjects also removes stuff? I guess by virtue of the fact that if it isn't included in that file list then it shouldn't be there? Correct?

Copy link
Member

Choose a reason for hiding this comment

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

the idea was: remove all paket stuff from a fsproj file and add it again. since we can't know if someone remove a package.

@forki
Copy link
Member

forki commented Mar 25, 2015

mhm. I think it will need a bit of testing from my side. Will try to look into it tomorrow.

@forki
Copy link
Member

forki commented Mar 26, 2015

so this only applies to the content file items, right?

@forki forki merged commit 87f031e into fsprojects:master Mar 26, 2015
@forki
Copy link
Member

forki commented Mar 26, 2015

thanks. let's see if it works.

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

2 participants