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

Allow to defuse -XepDisableAllChecks by -XepEnableAllChecks if it is present in javacopts later. #4474

Open
dkashyn-sfdc opened this issue Jul 17, 2024 · 0 comments

Comments

@dkashyn-sfdc
Copy link

We have a particular toolchain config that contains -XepDisableAllChecks to speed build up a little. We want to be able to enable checks for certain targets but providing extra javacopt value.

As of now there are plenty of settings that disabling certain parts of EP yet there is no way to negate those disablements if we want to do this on target level.

            default_java_toolchain(
                name = "javac_toolchain_%d" % (release),
                configuration = DEFAULT_TOOLCHAIN_CONFIGURATION,
                source_version = "%s" % release,
                target_version = "%s" % release,
                package_configuration = [
                    ":disable_warnings",
                    ":parameters_for_spring",
                    ":debug",
                ],
                java_runtime = Label("...."),
                jvm_opts = BASE_JDK9_JVM_OPTS + ["-Xss4m", "-XX:-MaxFDLimit"],
                javacopts = DEFAULT_JAVACOPTS,
                visibility = ["//visibility:public"],
            )

        disable_warning_javac_opts = [
            "-Xlint:none",
            "-nowarn",
            "-XepDisableWarningsInGeneratedCode",
        ]
        if no_error_prone:
            disable_warning_javac_opts += ["-XepDisableAllChecks"]
        java_package_configuration(
            name = "disable_warnings",
            javacopts = disable_warning_javac_opts,
            packages = ["...:all_packages"],
        )
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

No branches or pull requests

1 participant