Skip to content

Clean up config traits #579

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

Merged
merged 8 commits into from
Sep 27, 2021
Merged

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Sep 10, 2021

And deprecate all the def apply-based constructors, in favor of the new Foo { ... } syntax.

It does not seem to correspond to any specified interface, and is
not used anywhere.
So that they can be created in a type-safe way with the
`new Foo { ... }` syntax.

We also standardize on `Int` for all small-integer fields.
Previously, some fields were typed as `Short`, but not
consistently.

We deprecate all the `apply`-based constructors, which are now
redundant.
So that they can be created with the `new Foo { ... }` syntax.

We deprecated the `apply` constructors, which are now redundant.
This is mostly motivated by making config traits non-native JS
traits, so that they can be created with the `new Foo { ... }`
syntax.

We deprecated the `apply` constructors, since they are now
redundant.

There are some other changes along the way.
This is mostly motivated by making config traits non-native JS
traits, so that they can be created with the `new Foo { ... }`
syntax.

We deprecated the `apply` constructors, since they are now
redundant.

There are some other changes along the way.
Instead, make the corresponding traits non-native JS traits, so
that they can be created with the `new Foo { ... }` syntax.
@sjrd sjrd requested review from japgolly and armanbilge September 10, 2021 10:04
Copy link
Member

@armanbilge armanbilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really great (thanks for continuing to contribute!!) and very huge ... honestly I skimmed most of the changes. A lot of this code I'll be revisiting anyway as we de-namespace.

@japgolly seems to be on a bit of a hiatus atm but hopefully he'll be back soon :)

@japgolly
Copy link
Contributor

Fantastic changes, thanks @sjrd . LGTM

@japgolly japgolly merged commit 4586cb6 into scala-js:master Sep 27, 2021
@sjrd sjrd deleted the cleanup-config-traits branch September 27, 2021 06:01
@armanbilge
Copy link
Member

@sjrd do you have any more planned/suggested cleanups for 2.0? I'm trying to get an idea of remaining blockers. Thanks!

@sjrd
Copy link
Member Author

sjrd commented Sep 27, 2021

I'd like to have separate definitions of sealed traits for Scala 3 that would be opaque types instead.

I think that's the only thing I have left.

@armanbilge
Copy link
Member

Thanks, let me pop that into an issue!

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.

3 participants