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 the scala plugin to properly return data #799

Merged
merged 1 commit into from
Apr 14, 2016
Merged

Fix the scala plugin to properly return data #799

merged 1 commit into from
Apr 14, 2016

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented Apr 13, 2016

There were several problems with the scala plugin:

  1. scala -version is returned on stderr not stdout so we were never setting this and thus the plugin never ran

  2. If sbt or scala weren't installed it threw exceptions

  3. we were storing shell outs return in the output value for no real reason

  4. if scala failed for some reason, but sbt succeeded we weren't setting the sbt values since were relied on scala[:version] being set

  5. the specs incorrectly mocked scala output to stdout

  6. the specs that checked to make sure values weren't set didn't actually run the plugin so they would always no find scala's key

While I was here I moved the version key for sbt into it's own key. This would allow us to add other sbt values in the future if we found them. If we make version to top level value we lose that ability forever.

There were several problems with the scala plugin:

1) scala -version is returned on stderr not stdout so we were never setting this and thus the plugin never ran

2) If sbt or scala weren't installed it threw exceptions

3) we were storing shell outs value in the output value for no real reason

4) if scala failed for some reason, but sbt succeeded we weren't setting the sbt values since were relied on scala[:version] being set

5) the specs incorrectly mocked scala output to stdout

6) the specs that checked to make sure values weren't set didn't actually run the plugin so they would always no find scala's key

While I was here I moved the version key for sbt into it's own key.  This would allow us to add other sbt values in the future if we found them. If we make version to top level value we lose that ability forever.
@thommay
Copy link
Contributor

thommay commented Apr 14, 2016

👍

@mcquin
Copy link
Contributor

mcquin commented Apr 14, 2016

Great catches! 👍

@tas50 tas50 merged commit fa26930 into master Apr 14, 2016
@tas50 tas50 added the Bug label Apr 14, 2016
@tas50 tas50 deleted the scala_fix branch April 22, 2016 18:27
@tas50 tas50 changed the title Fix the scala plugin Fix the scala plugin to properly return data Apr 23, 2016
@thommay thommay added Type: Bug Does not work as expected. and removed Bug labels Jan 24, 2017
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug Does not work as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants