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

Introduce os.SubProcess.env DynamicVariable to override default env #295

Merged
merged 10 commits into from
Aug 30, 2024

Conversation

lolgab
Copy link
Member

@lolgab lolgab commented Aug 29, 2024

In Mill and any client-server application, it is handy to start processes on the server passing the client environment. This requires to pass the environment manually in all the os.proc(...).call()s. An easier alternative is to override the environment as we to for os.Inherit out, in and err pipes. So users can forget about the environment and have the right one passed automatically.

Pull request: #295

@lolgab lolgab requested review from lihaoyi and lefou August 29, 2024 13:35
In Mill and any client-server application, it is handy to start processes on the server passing the
client environment. This requires to pass the environment manually in all the `os.proc(...).call()`s.
An easier alternative is to override the environment as we to for `os.Inherit` `out`, `in` and `err` pipes.
So users can forget about the environment and have the right one passed automatically.
@lolgab
Copy link
Member Author

lolgab commented Aug 29, 2024

This should allow us to fix com-lihaoyi/mill#2881

build.sc Outdated Show resolved Hide resolved
os/src/ProcessOps.scala Outdated Show resolved Hide resolved
@lolgab lolgab requested a review from lefou August 30, 2024 00:14
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. We need to mention the concept in the readme/docs and give an example.

@lolgab lolgab requested a review from lefou August 30, 2024 14:47
@lolgab lolgab changed the title Introduce os.proc.env DynamicVariable to override default env Introduce os.SubProcess.env DynamicVariable to override default env Aug 30, 2024
Readme.adoc Outdated Show resolved Hide resolved
Co-authored-by: Tobias Roeser <le.petit.fou@web.de>
@lefou lefou added this to the after 0.10.4 milestone Aug 30, 2024
@lolgab lolgab merged commit 8d0abda into com-lihaoyi:main Aug 30, 2024
9 checks passed
@lolgab lolgab deleted the env-dynamic-variable branch August 30, 2024 15:20
scarisey referenced this pull request in scarisey/pct-compose Aug 31, 2024
This PR contains the following updates:

| Package | Type | Update | Change | Age | Adoption | Passing |
Confidence |
|---|---|---|---|---|---|---|---|
|
[com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-core](https://github.com/plokhotnyuk/jsoniter-scala)
| Test | patch | `2.30.7` -> `2.30.9` |
[![age](https://developer.mend.io/api/mc/badges/age/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-core/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-core/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-core/2.30.7/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-core/2.30.7/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-core](https://github.com/plokhotnyuk/jsoniter-scala)
| | patch | `2.30.7` -> `2.30.9` |
[![age](https://developer.mend.io/api/mc/badges/age/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-core/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-core/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-core/2.30.7/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-core/2.30.7/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-macros](https://github.com/plokhotnyuk/jsoniter-scala)
| Test | patch | `2.30.7` -> `2.30.9` |
[![age](https://developer.mend.io/api/mc/badges/age/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-macros/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-macros/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-macros/2.30.7/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-macros/2.30.7/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-macros](https://github.com/plokhotnyuk/jsoniter-scala)
| | patch | `2.30.7` -> `2.30.9` |
[![age](https://developer.mend.io/api/mc/badges/age/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-macros/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-macros/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-macros/2.30.7/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/sbt-package/com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-macros/2.30.7/2.30.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [com.lihaoyi:mainargs](https://github.com/com-lihaoyi/mainargs) |
Test | patch | `0.7.1` -> `0.7.2` |
[![age](https://developer.mend.io/api/mc/badges/age/sbt-package/com.lihaoyi:mainargs/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/sbt-package/com.lihaoyi:mainargs/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/sbt-package/com.lihaoyi:mainargs/0.7.1/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/sbt-package/com.lihaoyi:mainargs/0.7.1/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [com.lihaoyi:mainargs](https://github.com/com-lihaoyi/mainargs) | |
patch | `0.7.1` -> `0.7.2` |
[![age](https://developer.mend.io/api/mc/badges/age/sbt-package/com.lihaoyi:mainargs/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/sbt-package/com.lihaoyi:mainargs/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/sbt-package/com.lihaoyi:mainargs/0.7.1/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/sbt-package/com.lihaoyi:mainargs/0.7.1/0.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [com.lihaoyi:os-lib](https://github.com/com-lihaoyi/os-lib) | Test |
patch | `0.10.3` -> `0.10.5` |
[![age](https://developer.mend.io/api/mc/badges/age/sbt-package/com.lihaoyi:os-lib/0.10.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/sbt-package/com.lihaoyi:os-lib/0.10.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/sbt-package/com.lihaoyi:os-lib/0.10.3/0.10.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/sbt-package/com.lihaoyi:os-lib/0.10.3/0.10.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [com.lihaoyi:os-lib](https://github.com/com-lihaoyi/os-lib) | |
patch | `0.10.3` -> `0.10.5` |
[![age](https://developer.mend.io/api/mc/badges/age/sbt-package/com.lihaoyi:os-lib/0.10.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/sbt-package/com.lihaoyi:os-lib/0.10.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/sbt-package/com.lihaoyi:os-lib/0.10.3/0.10.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/sbt-package/com.lihaoyi:os-lib/0.10.3/0.10.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [scala](https://github.com/scala/scala3) | | minor | `3.4.2` ->
`3.5.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/scala/3.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/scala/3.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/scala/3.4.2/3.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/scala/3.4.2/3.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>plokhotnyuk/jsoniter-scala
(com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-core)</summary>

###
[`v2.30.9`](https://github.com/plokhotnyuk/jsoniter-scala/releases/tag/v2.30.9)

[Compare
Source](https://github.com/plokhotnyuk/jsoniter-scala/compare/v2.30.8...v2.30.9)

- Generation of more compact code for reading of arrays and array
sequences of primitives
-   More efficient writing of `java.time.Period` values
- More efficient decoding and encoding of `java.time.*` values by the
circe-booster codec from `jsoniter-scala-circe` module
- More efficient writing of `BigDecimal` and `java.time.Duration` values
using Scala.js
-   Update Scala Native to 0.5.5

All changes
plokhotnyuk/jsoniter-scala@v2.30.8...v2.30.9

###
[`v2.30.8`](https://github.com/plokhotnyuk/jsoniter-scala/releases/tag/v2.30.8)

[Compare
Source](https://github.com/plokhotnyuk/jsoniter-scala/compare/v2.30.7...v2.30.8)

- Fix to use proper compilation error message in cases when the codec
cannot be derived due to non-concrete ADT leaf classes with free type
parameters

All changes
plokhotnyuk/jsoniter-scala@v2.30.7...v2.30.8

</details>

<details>
<summary>com-lihaoyi/mainargs (com.lihaoyi:mainargs)</summary>

###
[`v0.7.2`](https://github.com/com-lihaoyi/mainargs/compare/0.7.1...0.7.2)

[Compare
Source](https://github.com/com-lihaoyi/mainargs/compare/0.7.1...0.7.2)

</details>

<details>
<summary>com-lihaoyi/os-lib (com.lihaoyi:os-lib)</summary>

###
[`v0.10.5`](https://github.com/com-lihaoyi/os-lib/releases/tag/0.10.5)

[Compare
Source](https://github.com/com-lihaoyi/os-lib/compare/0.10.4...0.10.5)

##### Merged Pull Requests

- Update Mill from 0.11.11 to 0.11.12 by
[@&#8203;scala-steward](https://github.com/scala-steward) in
[https://github.com/com-lihaoyi/os-lib/pull/293](https://github.com/com-lihaoyi/os-lib/pull/293)
- Update utest from 0.8.3 to 0.8.4 by
[@&#8203;scala-steward](https://github.com/scala-steward) in
[https://github.com/com-lihaoyi/os-lib/pull/291](https://github.com/com-lihaoyi/os-lib/pull/291)
- Introduce `os.SubProcess.env` `DynamicVariable` to override default
`env` by [@&#8203;lolgab](https://github.com/lolgab) in
[https://github.com/com-lihaoyi/os-lib/pull/295](https://github.com/com-lihaoyi/os-lib/pull/295)

**Full Changelog**:
com-lihaoyi/os-lib@0.10.4...0.10.5

###
[`v0.10.4`](https://github.com/com-lihaoyi/os-lib/releases/tag/0.10.4)

[Compare
Source](https://github.com/com-lihaoyi/os-lib/compare/0.10.3...0.10.4)

##### Merged Pull Requests

- Update Mill from 0.11.8 to 0.11.9 by
[@&#8203;scala-steward](https://github.com/scala-steward) in
[https://github.com/com-lihaoyi/os-lib/pull/285](https://github.com/com-lihaoyi/os-lib/pull/285)
- Move test projects into `os/test/` folder by
[@&#8203;lihaoyi](https://github.com/lihaoyi) in
[https://github.com/com-lihaoyi/os-lib/pull/289](https://github.com/com-lihaoyi/os-lib/pull/289)
- Added proper SIGTERM/SIGKILL handling for sub-processes by
[@&#8203;j-mie6](https://github.com/j-mie6) in
[https://github.com/com-lihaoyi/os-lib/pull/286](https://github.com/com-lihaoyi/os-lib/pull/286)
- Update scalafmt version from 3.8.2 to 3.8.3 by
[@&#8203;scala-steward](https://github.com/scala-steward) in
[https://github.com/com-lihaoyi/os-lib/pull/288](https://github.com/com-lihaoyi/os-lib/pull/288)
- Update Mill to 0.11.11 by [@&#8203;lefou](https://github.com/lefou)
in
[https://github.com/com-lihaoyi/os-lib/pull/290](https://github.com/com-lihaoyi/os-lib/pull/290)
- Add lightweight syntax for `os.proc().call()` and `os.proc().spawn()`
by [@&#8203;lihaoyi](https://github.com/lihaoyi) in
[https://github.com/com-lihaoyi/os-lib/pull/292](https://github.com/com-lihaoyi/os-lib/pull/292)

##### New Contributors

- [@&#8203;j-mie6](https://github.com/j-mie6) made their first
contribution in
[https://github.com/com-lihaoyi/os-lib/pull/286](https://github.com/com-lihaoyi/os-lib/pull/286)

**Full Changelog**:
com-lihaoyi/os-lib@0.10.3...0.10.4

</details>

<details>
<summary>scala/scala3 (scala)</summary>

### [`v3.5.0`](https://github.com/scala/scala3/releases/tag/3.5.0)

[Compare
Source](https://github.com/scala/scala3/compare/3.4.3...3.5.0)

### Highlights of the release

- Bundle scala-cli in scala command
[#&#8203;20351](https://github.com/scala/scala3/pull/20351)
- Introduce Best Effort compilation options
[#&#8203;17582](https://github.com/lampepfl/dotty/pull/17582)
- Add support for Pipelined builds
[#&#8203;18880](https://github.com/lampepfl/dotty/pull/18880)
- Add support for `var` in refinements
[#&#8203;19982](https://github.com/lampepfl/dotty/pull/19982)
- Implement SIP-42 - Support for binary integer literals
[#&#8203;19405](https://github.com/lampepfl/dotty/pull/19405)

> \[!NOTE]\
> Installation of a new Scala runner using Coursier requires it to be
updated or reinstalled to Coursier 2.1.10 or above. Earlier versions did
not support installing native packages, defaulted to the old runner JAR.

### Other changes and fixes

#### Backend

- Fix Closure span assignment in makeClosure
[#&#8203;15841](https://github.com/lampepfl/dotty/pull/15841)

#### Default parameters

- Fix default args lookup for given classes
[#&#8203;20256](https://github.com/lampepfl/dotty/pull/20256)
- Fix implicit search failure reporting
[#&#8203;20261](https://github.com/lampepfl/dotty/pull/20261)

#### Derivation

- Fix infinite loop in Mirror synthesis of unreducible match type
[#&#8203;20133](https://github.com/lampepfl/dotty/pull/20133)

#### Desugaring

- Add explanation to checkCaseClassInheritanceInvariant error msg
[#&#8203;20141](https://github.com/lampepfl/dotty/pull/20141)

#### Exports

- Add annotations in parameters for exports
[#&#8203;20140](https://github.com/lampepfl/dotty/pull/20140)
- Fix isAliasType
[#&#8203;20195](https://github.com/lampepfl/dotty/pull/20195)

#### Implicits

- Fix implicitNotFound message for type aliases
[#&#8203;19343](https://github.com/lampepfl/dotty/pull/19343)
- Normalize types before collecting parts determining implicit scope
[#&#8203;20077](https://github.com/lampepfl/dotty/pull/20077)
- Better error diagnostics under -explain-cyclic
[#&#8203;20251](https://github.com/lampepfl/dotty/pull/20251)
- Update unreducible match types error reporting
[#&#8203;19954](https://github.com/lampepfl/dotty/pull/19954)
- Improve ConstraintHandling of SkolemTypes
[#&#8203;20175](https://github.com/lampepfl/dotty/pull/20175)

#### Incremental Compilation

- Retain default parameters with `export`
[#&#8203;20167](https://github.com/lampepfl/dotty/pull/20167)

#### Inline

- Fix by-name parameter in beta-reduction
[#&#8203;20096](https://github.com/lampepfl/dotty/pull/20096)
- Add warning for anonymous inline classes
([#&#8203;16723](https://github.com/scala/scala3/issues/16723))
[#&#8203;20291](https://github.com/lampepfl/dotty/pull/20291)
- Avoid conversion of `Unit` type into `()` term
[#&#8203;20295](https://github.com/lampepfl/dotty/pull/20295)
- Type desugared `transparent inline def unapply` call in the correct
mode [#&#8203;20108](https://github.com/lampepfl/dotty/pull/20108)
- Regression: fix compilation performance on Windows
[#&#8203;20193](https://github.com/lampepfl/dotty/pull/20193)
- Fix inline match on blocks with multiple statements
[#&#8203;20125](https://github.com/lampepfl/dotty/pull/20125)
- Inline `unapply`s in the inlining phase
[#&#8203;19382](https://github.com/lampepfl/dotty/pull/19382)
- Fix outerSelect in Inliner
[#&#8203;20313](https://github.com/lampepfl/dotty/pull/20313)

#### Linting

- Fix [#&#8203;20146](https://github.com/scala/scala3/issues/20146):
attach the original name if there is an import selection for an indent
[#&#8203;20163](https://github.com/lampepfl/dotty/pull/20163)
- Add regression test for issue 18632
[#&#8203;20308](https://github.com/lampepfl/dotty/pull/20308)

#### Match Types

- Make aliases of `MatchAlias`es normal `TypeAlias`es
[#&#8203;19871](https://github.com/lampepfl/dotty/pull/19871)
- Fix [#&#8203;19746](https://github.com/scala/scala3/issues/19746):
Do not follow param term refs in `isConcrete`.
[#&#8203;20015](https://github.com/lampepfl/dotty/pull/20015)
- Do match type reduction atPhaseNoLater than ElimOpaque
[#&#8203;20017](https://github.com/lampepfl/dotty/pull/20017)
- Do not flag match types as `Deferred` and amend
[#&#8203;20077](https://github.com/scala/scala3/issues/20077)
[#&#8203;20147](https://github.com/lampepfl/dotty/pull/20147)
- Always use baseType when constraining patternTp with scrutineeTp
[#&#8203;20032](https://github.com/lampepfl/dotty/pull/20032)
- Use `MirrorSource.reduce` result for `companionPath`
[#&#8203;20207](https://github.com/lampepfl/dotty/pull/20207)
- Regression: Fix match type extraction of a MatchAlias
[#&#8203;20111](https://github.com/lampepfl/dotty/pull/20111)
- Revert "Approximate MatchTypes with lub of case bodies, if
non-recursive" in 3.5.0
[#&#8203;21266](https://github.com/scala/scala3/pull/21266)

#### Polyfunctions

- Discard poly-functions when trying to resolve overloading
[#&#8203;20181](https://github.com/lampepfl/dotty/pull/20181)

#### Presentation Compiler

- Stabilise returned completions by improving deduplication + extra
completions for constructors
[#&#8203;19976](https://github.com/lampepfl/dotty/pull/19976)
- Fix active param index for empty param lists
[#&#8203;20142](https://github.com/lampepfl/dotty/pull/20142)
- Delias type members in hover
[#&#8203;20173](https://github.com/lampepfl/dotty/pull/20173)
- Interactive: handle context bounds in extension construct workaround
[#&#8203;20201](https://github.com/lampepfl/dotty/pull/20201)
- Fix: prefer non-export definition locations
[#&#8203;20252](https://github.com/lampepfl/dotty/pull/20252)
- Don't show enum completions in new keyword context
[#&#8203;20304](https://github.com/lampepfl/dotty/pull/20304)
- Chore: Backport changes for presentation compiler
[#&#8203;20345](https://github.com/lampepfl/dotty/pull/20345)
- Add custom matchers for completions (fuzzy search for presentation
compiler)
[#&#8203;19850](https://github.com/lampepfl/dotty/pull/19850)

#### Quotes

- Fix TermRef prefixes not having their type healed
[#&#8203;20102](https://github.com/lampepfl/dotty/pull/20102)
- Improve reporting in staging about the possible use of an incorrect
class loader
[#&#8203;20137](https://github.com/lampepfl/dotty/pull/20137)
- Introduce MethodTypeKind to quotes reflection API
[#&#8203;20249](https://github.com/lampepfl/dotty/pull/20249)
- Add quote ASTs to TASTy
[#&#8203;20165](https://github.com/lampepfl/dotty/pull/20165)

#### Reflection

- Allow to beta reduce curried function applications in quotes reflect
[#&#8203;18121](https://github.com/lampepfl/dotty/pull/18121)
- Set the inlining phase in the Context used for checking macro trees
[#&#8203;20087](https://github.com/lampepfl/dotty/pull/20087)
- Add Symbol.isSuperAccessor to reflection API
[#&#8203;13388](https://github.com/lampepfl/dotty/pull/13388)
- Stabilize reflect `SymbolMethods.isSuperAccessor`
[#&#8203;20198](https://github.com/lampepfl/dotty/pull/20198)

#### Repl

- Fix validity period of derived SingleDenotations
[#&#8203;19983](https://github.com/lampepfl/dotty/pull/19983)
- Fix [#&#8203;18383](https://github.com/scala/scala3/issues/18383):
Never consider top-level `import`s as unused in the repl.
[#&#8203;20310](https://github.com/lampepfl/dotty/pull/20310)

#### Reporting

- Warn if extension receiver already has member
[#&#8203;17543](https://github.com/lampepfl/dotty/pull/17543)
- Deprecation of case class elements
[#&#8203;17911](https://github.com/lampepfl/dotty/pull/17911)
- Support src filter in -WConf (Closes
[#&#8203;17635](https://github.com/scala/scala3/issues/17635))
[#&#8203;18783](https://github.com/lampepfl/dotty/pull/18783)
- Add note about type mismatch in automatically inserted apply argument
[#&#8203;20023](https://github.com/lampepfl/dotty/pull/20023)
- Make error reporting resilient to exception thrown while reporting
[#&#8203;20158](https://github.com/lampepfl/dotty/pull/20158)
- Remove duplicate comma from Matchable selector warning
[#&#8203;20159](https://github.com/lampepfl/dotty/pull/20159)
- Generalize warnings for top-level calls to Any or AnyRef methods
[#&#8203;20312](https://github.com/lampepfl/dotty/pull/20312)
- Make CheckUnused not slow.
[#&#8203;20321](https://github.com/lampepfl/dotty/pull/20321)
- Bring back ambiguity filter when we report an implicit not found error
[#&#8203;20368](https://github.com/scala/scala3/pull/20368)
- Treat 3.5-migration the same as 3.5 for a warning about implicit
priority change
[#&#8203;20436](https://github.com/scala/scala3/pull/20436)
- Priority warning fix alternative
[#&#8203;20487](https://github.com/scala/scala3/pull/20487)
- Use final result type to check selector bound
[#&#8203;20989](https://github.com/scala/scala3/pull/20989)
- Refine implicit priority change warnings
[#&#8203;21045](https://github.com/scala/scala3/pull/21045)
- Backport "Fix healAmbiguous to compareAlternatives with disambiguate =
true" to 3.5.0
[#&#8203;21344](https://github.com/scala/scala3/pull/21344)

#### Rewrites

- Patch indentation when removing braces (and other bug fixes in
`-indent -rewrite`)
[#&#8203;17522](https://github.com/lampepfl/dotty/pull/17522)
- Extra check to avoid converting block expressions on the rhs of an in…
[#&#8203;20043](https://github.com/lampepfl/dotty/pull/20043)

#### Scaladoc

- Fix scaladoc crash on Windows - illegal path character
[#&#8203;20311](https://github.com/lampepfl/dotty/pull/20311)
- Scaladoc: improve refined function types rendering
[#&#8203;20333](https://github.com/lampepfl/dotty/pull/20333)
- Relax font-weight reset
[#&#8203;20348](https://github.com/lampepfl/dotty/pull/20348)

#### Scala JS

- Optimize main.js
[#&#8203;20093](https://github.com/lampepfl/dotty/pull/20093)

#### Settings

- Lift Scala Settings from experimental to stabilized
[#&#8203;20199](https://github.com/lampepfl/dotty/pull/20199)

#### Tooling

- Detect macro dependencies that are missing from the classloader
[#&#8203;20139](https://github.com/lampepfl/dotty/pull/20139)
- Write pipelined tasty in parallel.
[#&#8203;20153](https://github.com/lampepfl/dotty/pull/20153)
- ConsoleReporter sends INFO to stdout
[#&#8203;20328](https://github.com/lampepfl/dotty/pull/20328)
- Bundle scala-cli in scala command
[#&#8203;20351](https://github.com/scala/scala3/pull/20351)
- Adapt the workflow to release on SDKMAN!
[#&#8203;20535](https://github.com/scala/scala3/pull/20535)
- Adapt the release workflow to SIP-46
[#&#8203;20565](https://github.com/scala/scala3/pull/20565)
- Release .zip instead of .tar.gz for windows in sdkman
[#&#8203;20630](https://github.com/scala/scala3/pull/20630)
- SIP 46 - read classpath from file, remove lib directory in
distribution
[#&#8203;20631](https://github.com/scala/scala3/pull/20631)
.gz for windows in sdkman
[#&#8203;20630](https://github.com/scala/scala3/pull/20630)
- Bump scala-cli to 1.4.0
[#&#8203;20859](https://github.com/scala/scala3/pull/20859)
- Add --skip-cli-updates by default to the scala command
[#&#8203;20900](https://github.com/scala/scala3/pull/20900)
- Use pathing jars in cli commands
[#&#8203;21121](https://github.com/scala/scala3/pull/21121)
- expand classpath of pathing jars in scala_legacy command
[#&#8203;21160](https://github.com/scala/scala3/pull/21160)
- emit generatedNonLocalClass in backend when callback is not enabled
[#&#8203;21186](https://github.com/scala/scala3/pull/21186)

#### Transform

- Fix overloaded default methods test in RefChecks
[#&#8203;20218](https://github.com/lampepfl/dotty/pull/20218)
- Fix handling of AppliedType aliases in outerPrefix
[#&#8203;20190](https://github.com/lampepfl/dotty/pull/20190)
- Elide unit binding when beta-reducing
[#&#8203;20085](https://github.com/lampepfl/dotty/pull/20085)

#### Typer

- Reduce projections of type aliases with class type prefixes
[#&#8203;19931](https://github.com/lampepfl/dotty/pull/19931)
- Re-lub also hard union types in simplify
[#&#8203;20027](https://github.com/lampepfl/dotty/pull/20027)
- Fix [#&#8203;19789](https://github.com/scala/scala3/issues/19789):
Merge same TypeParamRef in orDominator
[#&#8203;20090](https://github.com/lampepfl/dotty/pull/20090)
- Allow SAM types to contain match alias refinements
[#&#8203;20092](https://github.com/lampepfl/dotty/pull/20092)
- Don't dealias when deciding which arguments to defer
[#&#8203;20116](https://github.com/lampepfl/dotty/pull/20116)
- Avoid the TypeVar.inst trap
[#&#8203;20160](https://github.com/lampepfl/dotty/pull/20160)
- Avoid crash when superType does not exist after erasure
[#&#8203;20188](https://github.com/lampepfl/dotty/pull/20188)
- Refine overloading and implicit disambiguation
[#&#8203;20084](https://github.com/lampepfl/dotty/pull/20084)
- Refactor constant folding of applications
[#&#8203;20099](https://github.com/lampepfl/dotty/pull/20099)
- Rollback constraints if `isSameType` failed second direction
[#&#8203;20109](https://github.com/lampepfl/dotty/pull/20109)
- Suppress "extension method will never be selected" for overrides
[#&#8203;20164](https://github.com/lampepfl/dotty/pull/20164)
- Allow SAM types to contain multiple refinements
[#&#8203;20172](https://github.com/lampepfl/dotty/pull/20172)
- Normalize when verifying if TypeTestCasts are unchecked
[#&#8203;20258](https://github.com/lampepfl/dotty/pull/20258)
- Avoid stacked thisCall contexts
[#&#8203;20488](https://github.com/scala/scala3/pull/20488)
- fix issue 20901: etaCollapse context bound type
[#&#8203;20910](https://github.com/scala/scala3/pull/20910)
- Fix symbol reference retrivial of `scala.caps.Caps`
[#&#8203;20493](https://github.com/scala/scala3/pull/20493)

### Experimental Changes

- Named tuples second implementation
[#&#8203;19174](https://github.com/lampepfl/dotty/pull/19174)
- Change rules for given prioritization
[#&#8203;19300](https://github.com/lampepfl/dotty/pull/19300)
- Enable experimental mode when experimental feature is imported
[#&#8203;19807](https://github.com/lampepfl/dotty/pull/19807)
- Add message parameter to `@experimental` annotation
[#&#8203;19935](https://github.com/lampepfl/dotty/pull/19935)
- Implement match type amendment: extractors follow aliases and
singletons
[#&#8203;20161](https://github.com/lampepfl/dotty/pull/20161)
- Avoid forcing whole package when using -experimental
[#&#8203;20409](https://github.com/scala/scala3/pull/20409)

#### Capture Checking

- Carry and check universal capability from parents correctly
[#&#8203;20004](https://github.com/lampepfl/dotty/pull/20004)
- Make parameter types of context functions inferred type trees
[#&#8203;20155](https://github.com/lampepfl/dotty/pull/20155)
- Handle reach capabilities correctly in depedent functions
[#&#8203;20203](https://github.com/lampepfl/dotty/pull/20203)
- Fix the visibility check in `markFree`
[#&#8203;20221](https://github.com/lampepfl/dotty/pull/20221)
- Make inline proxy vals have inferred types
[#&#8203;20241](https://github.com/lampepfl/dotty/pull/20241)
- CC: Give more info when context function parameters leak
[#&#8203;20244](https://github.com/lampepfl/dotty/pull/20244)
- Plug soundness hole for reach capabilities
[#&#8203;20051](https://github.com/lampepfl/dotty/pull/20051)
- Tighten the screws a bit more to seal the soundness hole for reach
capabilities
[#&#8203;20056](https://github.com/lampepfl/dotty/pull/20056)
- Drop retains annotations in inferred type trees
[#&#8203;20057](https://github.com/lampepfl/dotty/pull/20057)
- Allow [@&#8203;retains](https://github.com/retains) arguments to be
context functions
[#&#8203;20232](https://github.com/lampepfl/dotty/pull/20232)
- Fix conversion of this.fld capture refs under separate compilation
[#&#8203;20238](https://github.com/lampepfl/dotty/pull/20238)

#### Erased definitions

- Fix "Compiler crash when using CanThrow"
[#&#8203;20210](https://github.com/lampepfl/dotty/pull/20210)
- Only allow erased parameters in erased definitions
[#&#8203;19686](https://github.com/lampepfl/dotty/pull/19686)

#### Initialization

- Deprecate `StandardPlugin.init` in favor of `initialize` method taking
implicit Context
[#&#8203;20330](https://github.com/lampepfl/dotty/pull/20330)
- Fix missing changesParents in PostTyper
[#&#8203;20062](https://github.com/lampepfl/dotty/pull/20062)
- Special case for next field of colon colon in global init checker
[#&#8203;20281](https://github.com/lampepfl/dotty/pull/20281)
- Extend whitelist in global initialization checker
[#&#8203;20290](https://github.com/lampepfl/dotty/pull/20290)

#### Macro Annotations

- Allow macro annotation to transform companion
[#&#8203;19677](https://github.com/lampepfl/dotty/pull/19677)
- Remove experimental `MainAnnotation`/`newMain` (replaced with
`MacroAnnotation`)
[#&#8203;19937](https://github.com/lampepfl/dotty/pull/19937)

#### Nullability

- Add flexible types to deal with Java-defined signatures under
-Yexplicit-nulls
[#&#8203;18112](https://github.com/lampepfl/dotty/pull/18112)
- Fix [#&#8203;20287](https://github.com/scala/scala3/issues/20287):
Add flexible types to Quotes library
[#&#8203;20293](https://github.com/lampepfl/dotty/pull/20293)
- Add fromNullable to Predef for explicit nulls
[#&#8203;20222](https://github.com/lampepfl/dotty/pull/20222)

### Contributors

Thank you to all the contributors who made this release possible 🎉

According to `git shortlog -sn --no-merges 3.4.2..3.5.0` these are:

```
   153	Martin Odersky
    53	Eugene Flesselle
    41	Jamie Thompson
    29	Wojciech Mazur
    25	Nicolas Stucki
    22	Sébastien Doeraene
    18	noti0na1
    16	Matt Bovel
    13	Guillaume Martres
    11	Paweł Marks
    10	Hamza REMMAL
     9	Yichen Xu
     8	Jan Chyb
     7	Hamza Remmal
     7	Som Snytt
     6	Jędrzej Rochala
     5	Fengyun Liu
     5	dependabot[bot]
     3	Mikołaj Fornal
     2	Aviv Keller
     2	EnzeXing
     1	Chris Pado
     1	Filip Zybała
     1	Georgi Krastev
     1	Jisoo Park
     1	Katarzyna Marek
     1	Lucas Nouguier
     1	Lucy Martin
     1	Ola Flisbäck
     1	Pascal Weisenburger
     1	Quentin Bernet
     1	Raphael Jolly
     1	Seth Tisue
     1	Stephane Bersier
     1	Tomasz Godzik
     1	Yoonjae Jeon
     1	aherlihy
     1	rochala
     1	willerf

```

### [`v3.4.3`](https://github.com/scala/scala3/releases/tag/3.4.3)

[Compare
Source](https://github.com/scala/scala3/compare/3.4.2...3.4.3)

### Highlights of the release

- Revert "Approximate MatchTypes with lub of case bodies, if
non-recursive" in 3.4.3
[#&#8203;21268](https://github.com/scala/scala3/pull/21268)

### Contributors

Thank you to all the contributors who made this release possible 🎉

According to `git shortlog -sn --no-merges 3.4.2..3.4.3` these are:

        8  Wojciech Mazur

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 7pm on thursday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/scarisey/pct-compose).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
lihaoyi added a commit that referenced this pull request Sep 7, 2024
Basically the same thing we did in
#295 and
#283, except rather than being
`os.SubProcess`-specific this applies to all usage of `os.pwd`. And with
similar limitations: this works for code paths that go through OS-Lib,
but not for code that uses `java.io` or `java.nio` directly.

AFAIK this is the last of the "global" things we need to redirect in
Mill tasks, after env variables and default subprocess streams. I'd like
it to go into Mill 0.12.0 together with the other sandboxing-related
changes

Added unit tests and updated the documentation

Pull Request: #298
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.

3 participants