Skip to content

Backport "Changes in preparation to make caps.Capability stable" to 3.7.0 #22962

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

Closed
wants to merge 1 commit into from

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][modified]
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.

1 participant