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

Support -Xno-optimized-callable-references kotlinc flag #394

Merged

Conversation

@Bencodes
Copy link
Collaborator Author

Rebased this one

Copy link
Collaborator

@restingbull restingbull left a comment

Choose a reason for hiding this comment

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

Add a check in _kotlin_toolchain_impl on the version number is gte 1.4

"x_no_optimized_callable_references": struct(
args = dict(
default = False,
doc = "Do not use optimized callable reference superclasses available from 1.4.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: "Do not use optimized callable reference superclasses. Available from 1.4."

@Bencodes
Copy link
Collaborator Author

Bencodes commented Dec 4, 2020

It would probably make more sense to do the validation in _kotlinc_options_provider_to_flags so that we can also validate the target level opts that aren't being consumed directly by the toolchain.

@restingbull
Copy link
Collaborator

It would probably make more sense to do the validation in _kotlinc_options_provider_to_flags so that we can also validate the target level opts that aren't being consumed directly by the toolchain.

Reasonable, considering #418.

@Bencodes Bencodes force-pushed the support-Xno-optimized-callable-references branch from 5fb0f79 to acc0b09 Compare December 9, 2020 22:26
@@ -162,7 +162,7 @@ def _adjust_resources_path(path, resource_strip_prefix):
return _adjust_resources_path_by_default_prefixes(path)

def _merge_kt_jvm_info(module_name, providers):
language_versions = {p.language_version: True for p in providers if p.language_verison}
language_versions = {p.language_version: True for p in providers if p.language_version}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There seems to have been a typo here

@Bencodes
Copy link
Collaborator Author

Bencodes commented Dec 9, 2020

Updated with some basic validation

@Bencodes Bencodes force-pushed the support-Xno-optimized-callable-references branch from 4ede8a5 to 4b050b8 Compare December 11, 2020 19:54
@restingbull
Copy link
Collaborator

Is it me, or the kotlinc flags getting longer?

@Bencodes Bencodes force-pushed the support-Xno-optimized-callable-references branch from 4b050b8 to 56b5c2f Compare December 24, 2020 01:02
@Bencodes
Copy link
Collaborator Author

Rebased this after all the kotlinc merges.

@restingbull
Copy link
Collaborator

Ah, thanks. Meant to rebase the pr and got distracted.

@restingbull restingbull merged commit 73695e3 into bazelbuild:master Dec 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.

2 participants