-
Notifications
You must be signed in to change notification settings - Fork 587
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
Function to remove Compile elems missing files #1078
Conversation
I'll have a look at this failure tomorrow. |
This works locally. I've reviewed it and think it's likely to be an x-plat path comparison issue in the test. Will push potential fix shortly. |
6d1431e
to
94d7dc7
Compare
OK. So I was correct and it fixed the x-plat path issue. However, I also added another check for a file in sub-folder and that bailed, because the include path of |
94d7dc7
to
30832ea
Compare
Time for a 🍺! 😉 I'm going to test this with a couple of real-world solutions now. Will leave as WIP and update when happy here. |
Yes please let me know when it's ready
|
I've failed to test this in the real-world yet. If I copy over the build binaries to my project and run it, I get this error, which is very odd, as the switch looks valid to me:
If I try and build the FAKE Nuget with the
What is the "best" way to build FAKE locally and test as a Nuget on a real project? My plan was to use |
Just run it without the sourcelink target
|
Will do. I was letting my make all the things work OCD get the better of me 😁. |
Yeah but sourcelinks checking against master and your pr isn't merged to
|
Understood. Thanks. |
As well as keeping project files in sync, I also need to be able to remove compile nodes from a project, where the Include attribute points to a file that is missing. This is useful when I have two projects including the same files, and I delete a bunch of them from the 'master' project I happen to be working on. This PR adds two functions. RemoveCompileNodesWithMissingFiles is intended for build script use and removeCompileNodesWithMissingFiles exists for testing purposes, because unlike the former, it does not write to the file system. I noticed this convention elsewhere in FAKE, but I'm not sure if it is considered idiomatic. Let me know.
30832ea
to
811f305
Compare
Built and tested as a nuget with my solution. It worked first time on my solution and happily fixed 8 slave projects, that contained 46 broken Compile Includes. So, works for me! Rebased against this mornings updates. 😜 |
Function to remove Compile elems missing files
As well as keeping project files in sync, I also need to be able to remove
Compile
nodes from a project, where theInclude
attribute points to a file that is missing from disk. This is useful when I have two projects including the same files, and I delete a bunch of them from the 'master' project I happen to be working on.This PR adds two functions.
RemoveCompileNodesWithMissingFiles
is intended for build script use andremoveCompileNodesWithMissingFiles
exists for testing purposes, because unlike the former, it does not write to the file system. I noticed this convention elsewhere in FAKE, but I'm not sure if it is considered idiomatic. Let me know.There is currently a single test that works. I'm going to try this on a real example tomorrow too. However, wanted to get it up for discussion.