Support API profiles in the style of -release #17691
Replies: 4 comments
-
This is a great idea! I'm glad I checked existing tickets before creating a new one. 💯 |
Beta Was this translation helpful? Give feedback.
-
This seems like something that could be done with a scalafix rule considering that there's already one to disallow a set of symbols: https://github.com/vovapolu/scaluzzi/blob/6deedfd4c3d05b2fc33bf8d8080d05011d473613/scalafix/input/src/main/scala/test/DisableSimple.scala#L3-L20, so the dual should be possible too. |
Beta Was this translation helpful? Give feedback.
-
This would be a stronger feature, as only the specified profile is available for typechecking. |
Beta Was this translation helpful? Give feedback.
-
Module support would be nice. This issue is about leveraging relaxed modules, "just import it all", as opposed to "keep me from seeing something": |
Beta Was this translation helpful? Give feedback.
-
A sample homework:
It would be nice if a student could
scalac --profile:homework1
which would surface only the allowed API on the classpath. This would work similarly to--release
. The trick might be how to make it easy to specify and generate the permitted API as act.sym
file.IRL projects could use such a facility to restrict API usage. In particular, it would not only restrict to a platform version like
-release
, but disallow methods deemed substandard for any reason.Beta Was this translation helpful? Give feedback.
All reactions