This document describes the breaking changes in v16, and how to migrate. You can find the complete changelog here.
In v15, Please used to be distributed with all its tools for the core languages: Go, Java, Python, and C++.
In v16, Please will download its tools on demand through build rules in the new internal
//_please/...
package.
Please also now installs the Please wrapper script, pleasew
, onto the path instead of
a symlink to the active Please version. This is more robust as it doesn't change between version upgrades
solving the rare case where Please would simply vanish off the path.
Please v16 now support go 1.16 through use of the go_module()
rules.
For context, go_get()
will recompile certain packages from source instead of using the
already compiled package. This doesn't work with the new fingerprinting introduced in go 1.15.
Going forward, go_get()
will be deprecated in favour of
go_module()
. For the most part, they work similarly, however there are a
few differences. Essentially:
go_get(
name = "some_module_foo",
# go_get allows you to include the package to install in the get url
get = "example.com/some/module/foo/...",
revision = "v1.0.0",
)
Will become:
go_module(
name = "some_module_foo",
# This must be a valid module name i.e. should match the go.mod
module = "example.com/some/module",
version = "v1.0.0",
# The packages to install have to be supplied differently
install = ["foo/..."],
)
For more information on using go_module()
, check out the
codelab.
There have been a couple small changes to the go rules. Most notably, a long standing issue where Please was pulling in all transitive dependencies for tests has been fixed. This means that tests now compile a lot faster, however you have to be explicit about your dependencies.
Any package imported by a .go
file must have a corresponding entry in the
deps = []
list. To help with migrating and keeping these up to date, you can use
wollemi, a tool to automatically
create and update your go rules.
In v15, Please would allow you to import the package example.com/module
, as
example.com/module/module
i.e. duplicating the basename. This import path isn't
technically correct and in v16 will no longer be permitted.
Please now downloads Mavan jars using the conventially naming _sources.jar
. This means
that tools like vs-code can pick them up improving tooling integration. Note that you can expect the hashes of
your third party dependencies to change between v15 and v16.
To update them, simply run:
$ plz hash --update //third_party/java:all
In v15, Please would automatically register the the pleasings repo such that you could reference it
as ///pleasings//...
. In v16 this has been removed for a number of reasons. Most
notably, most users were not using it. Secondly, it's recommended to pin third party dependencies to a specific
version.
If you would like to use build rules from the pleasings repo, you need to add a subrepo to your build graph.
To do this automatically, simply run plz init pleasings
.
This flag was deprecated, and now has been removed. If you wish to force Please to rebuild or retest a
target, use --rebuild
and --rerun
respectively. If you would
actually like to disable the cache, you can override the dir and http cache config settings as such:
$ plz -o cache.dir: -o cache.httpurl: build/test/...
This flag has been superseded by --shell
, which essentially does the same thing,
except it also drops you into the prepared directory.
When configured to upload test results, Please will no longer populate stdout or stderr on success. This
massively saves space. There's also a new config option to gzip the test results to further reduce space
requirements. If this output is required, set the config option
Test.StoreTestOutputOnSuccess
, to true. For more information on how to configure this,
see the docs here.