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

fix for parsing output path when condition has no spaces #1058

Merged
merged 2 commits into from
Sep 12, 2015

Conversation

ascjones
Copy link
Contributor

Fix for issue: #1057

The tests pass, but @amazingant (who wrote the parsing code) may need to double check that to see that it doesn't break any other scenarios.

@@ -639,7 639,7 @@ type ProjectFile =
let c = input.[index]
if data.Length = 0 && c = ' '
then parseComparison data input (index 1)
elif data.Length = 2 && c <> ' '
elif data.Length = 2 && c <> ' ' && c <> '\''
Copy link
Contributor

Choose a reason for hiding this comment

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

What you wrote here should work fine for #1057.
If I had thought of conditions without spaces when I wrote the parser, I might have written this line as something like so:

let isCompChar c = c = '<' || c = '>' || c = '!' || c = '='
...
elif data.Length = 2 && isCompChar c

(helper function so the next elif could be simplified as well)
If you want to do that with this PR, let me know how the tests go; otherwise this looks good to me 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed you're right that is a significantly less naive approach. Pull request amended.

@ascjones
Copy link
Contributor Author

Travis build fails, but only because it fails to install mono due to some apt-get 404s:

The command "sudo apt-get install -qq mono-complete mono-vbnc fsharp nuget referenceassemblies-pcl" failed and exited with 100

#itbuildsonmymachine

@forki
Copy link
Member

forki commented Sep 11, 2015

yes same on FAKE build see fsprojects/FAKE#949

forki added a commit that referenced this pull request Sep 12, 2015
fix for parsing output path when condition has no spaces
@forki forki merged commit 9a1c547 into fsprojects:master Sep 12, 2015
@forki
Copy link
Member

forki commented Sep 12, 2015

thx

@ascjones ascjones deleted the condition-parsing-fix branch September 13, 2015 11:22
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

3 participants