Skip to content

Commit

Permalink
Tagging off version 10.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
peterebden committed Nov 13, 2017
1 parent 5e04324 commit a1eacfb
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 53 deletions.
15 changes: 15 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
-------------

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.5.1
10.0.0
27 changes: 0 additions & 27 deletions src/core/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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."`
Expand Down
3 changes: 1 addition & 2 deletions src/parse/rules/java_rules.build_defs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
20 changes: 4 additions & 16 deletions src/parse/rules/proto_rules.build_defs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 []
Expand Down Expand Up @@ -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:
Expand All @@ -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,
Expand Down
9 changes: 2 additions & 7 deletions src/parse/rules/sh_rules.build_defs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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(
Expand Down Expand Up @@ -91,16 +90,14 @@ 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.
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
Expand All @@ -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,
Expand Down

0 comments on commit a1eacfb

Please sign in to comment.