Scala Programming Language
  1. Scala Programming Language
  2. SI-4990

Improve migration messages, make the compiler print the migration version by default, adjust usage of @migration to correspond to @deprecated and make -Xmigration configurable with a threshold

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Misc Compiler, Misc Library
    • Labels:

      Description

      The title actually tells everyting.

        Activity

        Hide
        Simon Ochsenreither added a comment -

        Actually I already did that a few weeks ago: https://github.com/oberon-team/scala/commits/migration-update

        =====================
        Reworked migration:

        • The @migration can now be used like @deprecation, old syntax is still supported, but deprecated.
        • Xmigration accepts a version string like "2.8" now. This will show only migration warnings since that version. Default is "2.9".
        • Improved the wording and the consistency of most migration messages, migration warnings now also show the version the change occurred.
          =====================

        I only have one problem with that solution left:

        Paul suggested that I change -Xmigration from BooleanSetting to ChoiceSetting, but although I can set a default value scala/scalac don't accept "-Xmigration" without a value anymore. I would have expected that "-Xmigration" would be accepted and the default value to be chosen if no argument to -Xmigration was given.

        Maybe someone can give me a hint on how to make -Xmigration behave that way ...

        Show
        Simon Ochsenreither added a comment - Actually I already did that a few weeks ago: https://github.com/oberon-team/scala/commits/migration-update ===================== Reworked migration: The @migration can now be used like @deprecation, old syntax is still supported, but deprecated. Xmigration accepts a version string like "2.8" now. This will show only migration warnings since that version. Default is "2.9". Improved the wording and the consistency of most migration messages, migration warnings now also show the version the change occurred. ===================== I only have one problem with that solution left: Paul suggested that I change -Xmigration from BooleanSetting to ChoiceSetting, but although I can set a default value scala/scalac don't accept "-Xmigration" without a value anymore. I would have expected that "-Xmigration" would be accepted and the default value to be chosen if no argument to -Xmigration was given. Maybe someone can give me a hint on how to make -Xmigration behave that way ...
        Hide
        Simon Ochsenreither added a comment -

        I fixed the remaining problems, pull request with additional tests is here:

        https://github.com/scala/scala/pull/91

        Show
        Simon Ochsenreither added a comment - I fixed the remaining problems, pull request with additional tests is here: https://github.com/scala/scala/pull/91
        Hide
        Simon Ochsenreither added a comment -

        This is now almost 6 weeks old.
        Could someone please at least reply if it needs further changes?

        Show
        Simon Ochsenreither added a comment - This is now almost 6 weeks old. Could someone please at least reply if it needs further changes?
        Hide
        Paul Phillips added a comment -

        "Someone", are you expecting to find someone other than me? I don't know if it needs further changes, I don't have time to look at it yet.

        Show
        Paul Phillips added a comment - "Someone", are you expecting to find someone other than me? I don't know if it needs further changes, I don't have time to look at it yet.

          People

          • Assignee:
            Unassigned
            Reporter:
            Simon Ochsenreither
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development