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

Tweak/misc nonunit #8

Closed
wants to merge 2,367 commits into from
Closed

Tweak/misc nonunit #8

wants to merge 2,367 commits into from

Conversation

som-snytt
Copy link
Owner

No description provided.

@som-snytt som-snytt force-pushed the tweak/misc-nonunit branch from 5df954b to 4c1a725 Compare March 25, 2022 03:10
som-snytt and others added 29 commits June 21, 2024 14:09
The previous tweak to take `if (_)` as `if (_: Boolean)` is too strict.

That disallowed

BooleanSetting().("-nowarn").withPostSetHook(if(_) maxwarns.value=0)
Adjust keepAlive for test under JDK 9 [ci: last-only]
…rp-dollar

Better split for missing-interpolator
This change adds a new flag `-Ycollect-statistics` that enables the same statistics gathering as `-Ystatistics` but without dumping all the statistics to the console. This is useful for build tools that want to collect statistics via a compiler plugin without interfering with the console output or the operation of `-Ystatistics` (if specified explicitly by the user).

Note that there is an internal `YstatisticsEnabled` setting that may appear to do this already, but in fact it controls both collecting and printing together. Even if you switched it on internally (without enabling any phase statistics via `-Ystatistics` / `-Yhot-statistics`) you would still get at least the phase timings summary.
RefinementClassSymbols are created ad hoc for types in asSeenFrom, two
symbols with the same parents don't compare `isSubClass`.
Rewrite phase assembly (`DependencyGraph`) [ci: last-only]
This PR adds a new `-system` / `--system` setting to scalac which mimics its counterpart in javac.

This fixes the biggest problem (at least for us) of scala/bug#13015. It is now possible to compile code against an older system image without enforcing strict module access. scalac generally does not enforce modules (scala/scala-dev#529) but it does when using `-release` (with class lookup based on `ct.sym`) and there was no way to opt out of these restrictions.

The usual opt-out in javac is `--add-exports` but it is not supported for system modules in combination with `--release` (https://bugs.openjdk.org/browse/JDK-8178152) so there is no expectation that scalac could support it. Instead the solution for javac is to replace `--release` with a combination of `-source`, `-target` and a system image for the target version via `--system`. This combination, unlike `--release`, can be used with `--add-exports`. If scalac adds full module support at a later time (with access restrictions enabled by default) it will also need to support `--add-exports` and allow its use in combination with `--system`.

I am also un-deprecating `-target` (which was deprecated in favor of `-release`) because it now has a legitimate use in combination with an alternative system image (just like in javac where it serves the same purpose and is not deprecated, either).
Backport of scala#10795:

This change adds a new flag `-Ycollect-statistics` that enables the same statistics gathering as `-Ystatistics` but without dumping all the statistics to the console. This is useful for build tools that want to collect statistics via a compiler plugin without interfering with the console output or the operation of `-Ystatistics` (if specified explicitly by the user).

Note that there is an internal `YstatisticsEnabled` setting that may appear to do this already, but in fact it controls both collecting and printing together. Even if you switched it on internally (without enabling any phase statistics via `-Ystatistics` / `-Yhot-statistics`) you would still get at least the phase timings summary.
Fix tasty test check files

ignore trailing whitespace in tasty diffs

Co-authored-by: A. P. Marki <[email protected]>
Co-authored-by: Jamie Thompson <[email protected]>
SethTisue and others added 28 commits October 28, 2024 10:05
…a-result

Improve result of bridge in delambdafy
Generate `AbstractZincFile` during `-sourcepath` workflow
since it doesn't add any information that is actually specific
to the `Ordering` type; and to prevent the message from also
being used for `Numeric` (a subtype of `Ordering`)

fixes scala/bug#13053
…named-arg

Deprecate infix named args [ci: last-only]
…1105

Merge 2.12.x to 2.13.x [ci: last-only]
sensible equals warning: strings and collections
Don't insert box instructions around label jumps
Document invisibility of `BeanProperty` methods from Scala 3
remove @implicitNotFound on Ordering
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.