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

Use versioncmp instead of type casting #330

Merged
merged 2 commits into from
Sep 26, 2018
Merged

Use versioncmp instead of type casting #330

merged 2 commits into from
Sep 26, 2018

Conversation

PierreR
Copy link
Contributor

@PierreR PierreR commented Sep 14, 2018

I would like to request the removal of this particular type annotation.

The annotation is what remains from the fork of puppetlabs-docker I maintain to make the module work with language-puppet. Language-puppet helps us tremendously when writing puppet configuration.

The annotation itself does not seem to bring any kind of type safety. I would argue it is not the right place to check the type of this particular global fact if such a check is at all necessary.

language-puppet is making great effort to be as compatible with the puppet language as possible. See recent commit. This particular idiom might be supported in the future but for now I am just requesting this change because all in all it seems to make sense.

Thanks you.

@PierreR
Copy link
Contributor Author

PierreR commented Sep 14, 2018

Tests failed. Is this casting instead of type annotation ? YGTBKM ;-)

@PierreR PierreR reopened this Sep 14, 2018
@PierreR PierreR changed the title Remove one unnecessary type annotation Use versioncmp instead of type casting Sep 14, 2018
@PierreR
Copy link
Contributor Author

PierreR commented Sep 14, 2018

I have changed the cast to versioncmp which is arguably way less evil !

@davejrt
Copy link
Contributor

davejrt commented Sep 26, 2018

LGTM

@davejrt davejrt merged commit 48fa672 into puppetlabs:master Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants