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 use DU insteadof IsCliTool boolean #2962

Merged
merged 1 commit into from
Jan 4, 2018

Conversation

enricosada
Copy link
Collaborator

@enricosada enricosada commented Jan 4, 2018

for #2938 (repo tool) i need to extend and add a new package type, who is neither a package for references, nor a dotnetcli tool.

But the current codebase store the info if a package is dotnetcli tool as boolean, and that's not really extendible.

Using a boolean make easy to make a mistake in behaviour check, more so if a new type is added. but also in current is may be error prone in checks, for example on filters/etc

this PR convert the IsCliTool: boolean properties to Kind properties of a specific DU

while this PR touch lots of files, is mostly a dumb refactoring:

  • false was always a Package type, true was a cliTool
  • each DU use a specific type, and conversions are exaustive (no wildcards)

@forki forki merged commit 41e51f8 into fsprojects:master Jan 4, 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.

2 participants