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

File Utilities #33

Closed
wants to merge 9 commits into from
Closed

File Utilities #33

wants to merge 9 commits into from

Conversation

donopj2
Copy link
Contributor

@donopj2 donopj2 commented Jan 4, 2018

This is just some rough utility functions and file types, but I figured it might be useful to others who just want to focus on the algorithm/ordering piece. Its heavily influenced by Paket, but since both projects need to parse .Net files I thought it made sense. I realize there is a laundry list of safety/platform logic to add so I'll be updating this PR as we go along. Basic usage:

let pf = ProjectFile.loadFromFile "Mechanic\Mechanic.fsproj"
let sfs = ProjectFile.getSourceFiles pf
let sfRev = List.rev sfs
ProjectFile.updateProjectFile sfRev pf

What are we planning to use for unit tests? I'll open an issue for discussion.

@@ -0,0 +1,80 @@
// The MIT License (MIT)
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need license here. It's in root

@forki
Copy link
Member

forki commented Jan 5, 2018

Couple of tests would be nice

@tomasaschan
Copy link

tomasaschan commented Jan 5, 2018

@donopj2 Nice work! Definitely a good start :)

Regarding tests, I introduced FsCheck.Xunit and Unquote (links in the Readme) in the scaffold, but that's just a personal preference because I've used them before. If you have other preferences, feel free to use them instead/also (just add whatever you need with Paket and start working). The only important thing is that all tests are in projects named *.Tests, and runnable with dotnet test <projfile>.

@tomasaschan
Copy link

Did you see this comment? Maybe we could leave some of the heavy lifting here to Forge...

@donopj2
Copy link
Contributor Author

donopj2 commented Jan 5, 2018

Yea Forge hadn't occurred to me but looks spot on for this. Makes sense.

@donopj2 donopj2 closed this Jan 5, 2018
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.

3 participants