Skip to content

Conversation

WojciechMazur
Copy link
Contributor

Backports #22849 to the 3.7.0-RC2.

PR submitted by the release tooling.

Make `scala.caps` a package instead of an object. 

The following are still under `scala.caps`, while staying `@experimental`:
- The Capability trait, which will be stable in near future
- The universal capture reference `cap` -- **now an object**. 
- The carrier trait for capture set parameters `CapSet`
- The `Contains` trait:
  - Due to `given`s cannot be marked `@experimental`, an experimental `Contains` object was created instead, which contains the `containsImpl` given.
- Exclusive capabilities annotations: `Mutable`, `SharedCapability` and `consume`
- The _`Exists`_ trait is marked `deprecated`, but is required to build the current version of the compiler. It should be removed in the next version.
- The `unsafe` object:
  -  `untrackedCaptures` is moved into `caps.unsafe`.
- Deprecated aliases `*` and `Cap` are **removed**

The following are moved under the experimental `scala.caps.internal` object:
- `capsOf`
- `rootCapability`, `reachCapability` and `readOnlyCapability`
- `refineOverride`

Add documentation for `Capability` and some other experimental annotations.
Tests are updated accordingly. 
[Cherry-picked f177289]
@WojciechMazur WojciechMazur force-pushed the backport-release-3.7.0-22849 branch from e4cd634 to 973e117 Compare April 10, 2025 12:58
@WojciechMazur WojciechMazur deleted the backport-release-3.7.0-22849 branch April 11, 2025 14:42
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.

2 participants