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

Add proper deprecation for classes renamed in OpalCompiler #17745

Open
JanBliznicenko opened this issue Feb 2, 2025 · 1 comment
Open

Add proper deprecation for classes renamed in OpalCompiler #17745

JanBliznicenko opened this issue Feb 2, 2025 · 1 comment

Comments

@JanBliznicenko
Copy link
Contributor

JanBliznicenko commented Feb 2, 2025

During Pharo 13 development, many AST and IB classes got prefix OC, like ASTMethodNode becoming OCMethodNode and IBMethod becoming OCIBMethod.
While AST-Core classes have deprecation rules set in BaselineOfBasicTools>>#postload:package: using deprecatedAliases:, there is no deprecation system applied on renamed classes in OpalCompiler-Core, like IRMethod renamed to OCIRMethod, causing any projects that subclass or extend classes like IRMethod not to load in Pharo 13, requiring manual changes in text editor outside of Pharo.

@Ducasse
Copy link
Member

Ducasse commented Feb 2, 2025

I like this script

makeDeprecatedClassAliases

    <script>
    self withAllSubclassesDo: [ :class |
        | deprecatedClass |
        deprecatedClass := (class name allButFirst: 2) asSymbol.
        class deprecatedAliases: { deprecatedClass } ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants