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

Refactor the project cracker into a new file et al. #618

Merged
merged 8 commits into from Oct 24, 2020
Merged

Refactor the project cracker into a new file et al. #618

merged 8 commits into from Oct 24, 2020

Conversation

teo-tsirpanis
Copy link
Contributor

@teo-tsirpanis teo-tsirpanis commented Oct 18, 2020

This PR:

  • Reduces the size of BuildCommand.fs by moving the project cracker in a file called ProjectCracker.fs.
  • Fixes The command tool does not correctly parse custom substitution parameters #617 by correctly grouping the arguments for the command's tool --parameters option and document how to use that command.
  • Makes the command tool stop reporting non-existent substitution parameters (they used to be reported as fsdocs-repository-link --> {{fsdocs-repository-link}}).
  • Removes the command tool's dependency to Newtonsoft.Json in favor of System.Text.Json in the documentation search index serializer.
  • Updates the packages, decluttering paket.lock.
  • Removes unnecessary code and optimizes performance in acouple of other cases.

Do not report nonexistent substitution parameters (see changes in the param function of ProjectCracker.fs).
Seq.pairwise [1;2;3;4] returns [1,2; 2,3; 3,4], not [1,2; 3,4].
And use Process.Start with UseShellExecute on all platforms (it is implemented on .NET Core).
Remove duplicate code in a helper function in BuildCommand.fs.
The most important is the replacement of the tree-based FSharpMap with the hashtable-based readOnlyDict.
…e thrown.

It is not needed. They will already be reported to the console and AggregateExceptions are not correctly handled.
src/FSharp.Formatting.CommandTool/Options.fs Show resolved Hide resolved
if this.strict then exit 1
false
with ex ->
Log.errorf "received exception :\n %A" ex
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't seem to be any different logic related to aggregate exceptions 👍

@dsyme dsyme merged commit f523d4c into fsprojects:master Oct 24, 2020
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.

The command tool does not correctly parse custom substitution parameters
3 participants