Skip to content

Conversation

kirklong and others added 11 commits May 24, 2022 07:56
Co-authored-by: Eric Hanson <5846501+ericphanson@users.noreply.github.com>
(cherry picked from commit 2b78a74)
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
(cherry picked from commit a23a4d9)
When calling `Pkg.test("Foo")`, some information from the calling
environment is incorporated into the tests of `Foo`; for example, if the
calling environment places restrictions on the package versions of
`Bar`, a dependency of `Foo`, those restrictions will be honored when
resolving the dependencies of the test environment for `Foo`.
Similarly, we should honor preferences set within the calling
environment.  The easiest way to do this is to layer the test
environment onto the end of the current `LOAD_PATH` instead of wholesale
replacing it, as we were doing when copying preferences over for the
test environment.

With this change it is now viable to test alternate configurations of a
package without dev'ing it out and modifying it directly.  If a package
`Foo` uses preference to alter its behavior, previously you would need
to `dev` it out and insert an override into its `LocalPreferneces.toml`
(or `test/LocalPreferences.toml`, if it had a separate test project) in
order for the preference to be read during test time.  Now, one can
simply set the preference in an environment that has `Foo` added, then
run `Pkg.test("Foo")`, and as long as the package itself doesn't define
the preference within its own testing environment, it will pick up the
default from the environment.

We allow the package to override values coming in from the environment,
as there may be rather sensitive preferences that it is best to not
allow easy overriding from.  For these cases, there is of course still
the `dev`-and-edit method available for tests.

(cherry picked from commit 5e5189b)
…s that are not packages (#3075)

fixes #2979

(cherry picked from commit 91ebd1f)
This commit prevents stack overflow when `safe_realpath` is called with a non-existing
path that does not start with a `/`, such as `D:\ProjectA` (on a Windows machine without
drive `D:`) or `non-existing-path`, fixes #3085.

(cherry picked from commit f092729)
@KristofferC KristofferC merged commit 7c1544f into release-1.8 May 24, 2022
@KristofferC KristofferC deleted the backports-release-1.8 branch May 24, 2022 11:16
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.

5 participants