Skip to content

Make compile scala callable #540

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

Merged
merged 1 commit into from
Jun 26, 2018
Merged

Make compile scala callable #540

merged 1 commit into from
Jun 26, 2018

Conversation

johnynek
Copy link
Contributor

this moves all the rest of the items I don't expect would be required out of the function accessing by ctx and instead by a parameter.

After this is merged, I will pick back up #510 which I think can be made to work using this PR.

Note, there are still some toolchain-ish stuff accessed on ctx, but I think that we will just have to add those to the thrift/proto generation rule until we have toolchains working correctly (see #530)

+ [ctx.outputs.manifest, ctx.executable._ijar, argfile])
compiler_classpath_jars.to_list() + all_srcjars.to_list() + list(sources)
+ plugins_list + dependency_analyzer_plugin_jars + classpath_resources +
resources + resource_jars + [manifest, ctx.executable._ijar, argfile])
Copy link
Contributor

Choose a reason for hiding this comment

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

What happened to ctx.files._java_runtime?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That should have been removed a long time ago. It was for when we were calling the java compiler ourselves. It is not needed to call ijar which is a c++ program (which we shouldn’t be calling this way anyway).

in_scalacopts,
print_compile_time,
expect_java_output,
scalac_jvm_flags = []):
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does the scalac_jvn_flags have a default value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have virtually never used this in practice and I just put it in. Would you prefer I remove it?

Copy link
Contributor

Choose a reason for hiding this comment

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

"we have virtually never used this in practice" you mean stripe, right? Because the code uses it.

Copy link
Contributor

Choose a reason for hiding this comment

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

We can't just remove it since it's part of the signature. Maybe your default makes sense. It's mainly surprising that it's the only one with a default value so it can confuse a future reader about whether this means something in particular

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I meant removing the default. Of course we can (and I assume will) iterate.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest to keep it as is (if it's alright with you) and remove the default

@ianoc-stripe
Copy link
Contributor

lgtm, remove the default in a follow up again if no one objects seems reasonable toof

@johnynek johnynek merged commit 33e9642 into master Jun 26, 2018
@ittaiz ittaiz deleted the oscar/compile_scala branch July 1, 2018 12:35
gergelyfabian pushed a commit to gergelyfabian/rules_scala that referenced this pull request May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants