diff --git a/ChangeLog b/ChangeLog index 04c381585c..360bee2737 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +Version 10.0.0 +-------------- + + * please_pex rewritten to be more efficient. This is a breaking change for anyone + who assumed they could import pkg_resources or pex as a global which will no longer + be available (although these are easy to add using pip_library or python_wheel rules + if still needed). + * cgo_library takes a subdir argument that is needed if sources are in a subdirectory + from the BUILD file (this isn't breaking since it never worked without). + * Support for assembly (using go tool asm) in go_library and go_binary rules. + * Removed a number of deprecated config properties. + * Removed a number of deprecated arguments to builtin build rules (most have been + deprecated and often nonfunctional for a long time now). + + Version 9.5.1 ------------- diff --git a/VERSION b/VERSION index 9c50fbf5d7..a13e7b9c87 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -9.5.1 +10.0.0 diff --git a/src/core/config.go b/src/core/config.go index ced49d3cb6..f42ba67e8a 100644 --- a/src/core/config.go +++ b/src/core/config.go @@ -91,26 +91,6 @@ func ReadConfigFiles(filenames []string) (*Configuration, error) { return config, fmt.Errorf("%s invalid for test.defaultcontainer; must be one of {none,docker}", c) } - // Deprecations - if config.Parse.ExperimentalDir == "" && config.Please.ExperimentalDir != "" { - config.Parse.ExperimentalDir = config.Please.ExperimentalDir - } - if config.Build.Nonce == "" && config.Please.Nonce != "" { - config.Build.Nonce = config.Please.Nonce - } - if config.Parse.Engine == "" && config.Please.ParserEngine != "" { - config.Parse.Engine = config.Please.ParserEngine - } - if config.Build.Lang == "" && config.Please.Lang != "" { - config.Build.Lang = config.Please.Lang - } - if len(config.Parse.BuildFileName) == 0 && len(config.Please.BuildFileName) > 0 { - config.Parse.BuildFileName = config.Please.BuildFileName - } - if len(config.Parse.BlacklistDirs) == 0 && len(config.Please.BlacklistDirs) > 0 { - config.Parse.BlacklistDirs = config.Please.BlacklistDirs - } - return config, nil } @@ -216,13 +196,6 @@ type Configuration struct { SelfUpdate bool `help:"Sets whether plz will attempt to update itself when the version set in the config file is different."` DownloadLocation cli.URL `help:"Defines the location to download Please from when self-updating. Defaults to the Please web server, but you can point it to some location of your own if you prefer to keep traffic within your network or use home-grown versions."` NumThreads int `help:"Number of parallel build operations to run.\nIs overridden by the equivalent command-line flag, if that's passed." example:"6"` - BuildFileName []string `help:"Deprecated, use parse.buildfilename instead"` - BlacklistDirs []string `help:"Deprecated, use parse.blacklistdirs instead"` - Lang string `help:"Deprecated, use build.lang instead"` - ParserEngine string `help:"Deprecated, use parse.engine instead"` - Nonce string `help:"Deprecated, use build.nonce instead"` - ExperimentalDir string `help:"Deprecated, use parse.experimentaldir instead"` - LintTool string `help:"Deprecated, use parse.linttool instead."` } `help:"The [please] section in the config contains non-language-specific settings defining how Please should operate."` Parse struct { LintTool string `help:"Location of the lint tool for BUILD files."` diff --git a/src/parse/rules/java_rules.build_defs b/src/parse/rules/java_rules.build_defs index 693f258f8e..0ee5fb9938 100644 --- a/src/parse/rules/java_rules.build_defs +++ b/src/parse/rules/java_rules.build_defs @@ -368,7 +368,7 @@ def maven_jars(name, id='', ids=None, repository=None, exclude=None, hashes=None def maven_jar(name, id, repository=None, hash=None, hashes=None, deps=None, visibility=None, filename=None, sources=True, licences=None, - exclude_paths=None, native=False, artifact_type=None, test_only=False, + native=False, artifact_type=None, test_only=False, binary=False, classifier='', classifier_sources_override=''): """Fetches a single Java dependency from Maven. @@ -383,7 +383,6 @@ def maven_jar(name, id, repository=None, hash=None, hashes=None, deps=None, filename (str): Filename we attempt to download. Defaults to standard Maven name. sources (bool): True to download source jars as well. licences (list): Licences this package is subject to. - exclude_paths (list): Deprecated. Paths to remove from the downloaded .jar. native (bool): Attempt to download a native jar (i.e. add "-linux-x86_64" etc to the URL). artifact_type (str): Type of artifact to download (defaults to jar but could be e.g. aar). test_only (bool): If True, this target can only be used by tests or other test_only rules. diff --git a/src/parse/rules/proto_rules.build_defs b/src/parse/rules/proto_rules.build_defs index 01ea945c37..c4f345c780 100644 --- a/src/parse/rules/proto_rules.build_defs +++ b/src/parse/rules/proto_rules.build_defs @@ -15,10 +15,8 @@ should be the return value of proto_language. _DEFAULT_GRPC_LABELS = ['grpc'] -def proto_library(name, srcs, plugins=None, deps=None, visibility=None, labels=None, - python_deps=None, cc_deps=None, java_deps=None, go_deps=None, - languages=None, test_only=False, root_dir='', - protoc_flags=None): +def proto_library(name, srcs, deps=None, visibility=None, labels=None, + languages=None, test_only=False, root_dir='', protoc_flags=None): """Compile a .proto file to generated code for various languages. Args: @@ -36,11 +34,6 @@ def proto_library(name, srcs, plugins=None, deps=None, visibility=None, labels=N protoc_flags (list): Additional flags to pass to protoc. Note that these are inherited by further rules that depend on this one (because in nearly all cases that will be necessary for them to build too). - python_deps (list): Deprecated, replaced by languages. - java_deps (list): Deprecated, replaced by languages. - go_deps (list): Deprecated, replaced by languages. - cc_deps (list): Deprecated, replaced by languages. - plugins (dict): Deprecated, replaced by languages. """ languages = _merge_dicts(languages or CONFIG.PROTO_LANGUAGES, proto_languages()) labels = labels or [] @@ -149,9 +142,8 @@ def proto_library(name, srcs, plugins=None, deps=None, visibility=None, labels=N ) -def grpc_library(name, srcs, deps=None, visibility=None, languages=None, python_deps=None, - java_deps=None, go_deps=None, cc_deps=None, labels=None, test_only=False, - root_dir='', protoc_flags=None): +def grpc_library(name, srcs, deps=None, visibility=None, languages=None, labels=None, + test_only=False, root_dir='', protoc_flags=None): """Defines a rule for a grpc library. Args: @@ -167,10 +159,6 @@ def grpc_library(name, srcs, deps=None, visibility=None, languages=None, python_ root_dir (str): The directory that the protos are compiled relative to. Useful if your proto files have import statements that are not relative to the repo root. protoc_flags (list): Additional flags to pass to protoc. - python_deps (list): Deprecated, replaced by languages. - java_deps (list): Deprecated, replaced by languages. - go_deps (list): Deprecated, replaced by languages. - cc_deps (list): Deprecated, replaced by languages. """ proto_library( name = name, diff --git a/src/parse/rules/sh_rules.build_defs b/src/parse/rules/sh_rules.build_defs index 08a68e931a..08e3928615 100644 --- a/src/parse/rules/sh_rules.build_defs +++ b/src/parse/rules/sh_rules.build_defs @@ -19,7 +19,7 @@ exit 0\n\ %(tarball_boundary)s""" -def sh_library(name, src, deps=None, visibility=None, link=True, labels=None): +def sh_library(name, src, deps=None, visibility=None, labels=None): """Generates a shell script binary, essentially just the given source. Note that these are individually executable so can only have one source file each. @@ -30,7 +30,6 @@ def sh_library(name, src, deps=None, visibility=None, link=True, labels=None): src (str): Source file for the rule. deps (list): Dependencies of this rule. visibility (list): Visibility declaration of the rule. - link (bool): Deprecated, has no effect. labels (list): List of labels. """ filegroup( @@ -91,7 +90,7 @@ def sh_binary(name, main, deps=None, visibility=None, labels=None): ) -def sh_test(name, src=None, args=None, labels=None, data=None, deps=None, size=None, +def sh_test(name, src=None, labels=None, data=None, deps=None, size=None, visibility=None, flags='', flaky=0, test_outputs=None, timeout=0, container=False, sandbox=None): """Generates a shell test. Note that these aren't packaged in a useful way. @@ -99,8 +98,6 @@ def sh_test(name, src=None, args=None, labels=None, data=None, deps=None, size=N Args: name (str): Name of the rule src (str): Test script file. - args (list): Deprecated, prefer 'flags' instead. - Arguments that will be passed to this test when run. labels (list): Labels to apply to this test. data (list): Runtime data for the test. deps (list): Dependencies of this rule @@ -113,8 +110,6 @@ def sh_test(name, src=None, args=None, labels=None, data=None, deps=None, size=N container (bool | dict): True to run this test within a container (eg. Docker). sandbox (bool): Sandbox the test on Linux to restrict access to namespaces such as network. """ - if args and not flags: - flags = ' '.join(args) timeout, labels = _test_size_and_timeout(size, timeout, labels) build_rule( name=name,