Skip to content

Deprecate old reflect isErased API #16847

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

Closed
nicolasstucki opened this issue Feb 7, 2023 · 1 comment
Closed

Deprecate old reflect isErased API #16847

nicolasstucki opened this issue Feb 7, 2023 · 1 comment
Labels
area:metaprogramming:reflection Issues related to the quotes reflection API needs-minor-release This PR cannot be merged until the next minor release

Comments

@nicolasstucki
Copy link
Contributor

nicolasstucki commented Feb 7, 2023

Based on the changes in #16507 we need to update the API. We must deprecate:

  • MethodTypeMethods.isErased
  • TermParamClauseMethods.isErased
  • TypeReprMethods.isErasedFunctionType
  • defn.FunctionClass

We can only deprecate these methods in a minor release.

Originally posted by @nicolasstucki in #16507 (comment)

@nicolasstucki nicolasstucki added the needs-minor-release This PR cannot be merged until the next minor release label Feb 7, 2023
@nicolasstucki
Copy link
Contributor Author

FunctionClass needs a replacement that does not take default arguments.

nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Feb 7, 2023
The old `FunctionClass` will need to be deprecated as we will remove
`ErasedFunctionN` and `ErasedContextFunctionN`. We will replace this API
with a simpler version that can return `FunctionN` or `ContextFunctionN`,
the only two stable function classes we have in the compiler/TASTy.

Other new function classes will be encoded with the more general refined
function type encoding, generalization of the `PolyFunction` encoding.
This implies that we won't need to add other kind of function classes to
the reflect API.

Part of the fix for scala#16847
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Feb 7, 2023
The old `FunctionClass` will need to be deprecated as we will remove
`ErasedFunctionN` and `ErasedContextFunctionN`. We will replace this API
with a simpler version that can return `FunctionN` or `ContextFunctionN`,
the only two stable function classes we have in the compiler/TASTy.

Other new function classes will be encoded with the more general refined
function type encoding, generalization of the `PolyFunction` encoding.
This implies that we won't need to add other kind of function classes to
the reflect API.

Part of the fix for scala#16847
@nicolasstucki nicolasstucki added the area:metaprogramming:reflection Issues related to the quotes reflection API label Feb 10, 2023
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Feb 13, 2023
The old `FunctionClass` will need to be deprecated as we will remove
`ErasedFunctionN` and `ErasedContextFunctionN`. We will replace this API
with a simpler version that can return `FunctionN` or `ContextFunctionN`,
the only two stable function classes we have in the compiler/TASTy.

Other new function classes will be encoded with the more general refined
function type encoding, generalization of the `PolyFunction` encoding.
This implies that we won't need to add other kind of function classes to
the reflect API.

Part of the fix for scala#16847
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Feb 13, 2023
The old `FunctionClass` will need to be deprecated as we will remove
`ErasedFunctionN` and `ErasedContextFunctionN`. We will replace this API
with a simpler version that can return `FunctionN` or `ContextFunctionN`,
the only two stable function classes we have in the compiler/TASTy.

Other new function classes will be encoded with the more general refined
function type encoding, generalization of the `PolyFunction` encoding.
This implies that we won't need to add other kind of function classes to
the reflect API.

Part of the fix for scala#16847
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Feb 13, 2023
The old `FunctionClass` will need to be deprecated as we will remove
`ErasedFunctionN` and `ErasedContextFunctionN`. We will replace this API
with a simpler version that can return `FunctionN` or `ContextFunctionN`,
the only two stable function classes we have in the compiler/TASTy.

Other new function classes will be encoded with the more general refined
function type encoding, generalization of the `PolyFunction` encoding.
This implies that we won't need to add other kind of function classes to
the reflect API.

Part of the fix for scala#16847
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Feb 15, 2023
The old `FunctionClass` will need to be deprecated as we will remove
`ErasedFunctionN` and `ErasedContextFunctionN`. We will replace this API
with a simpler version that can return `FunctionN` or `ContextFunctionN`,
the only two stable function classes we have in the compiler/TASTy.

Other new function classes will be encoded with the more general refined
function type encoding, generalization of the `PolyFunction` encoding.
This implies that we won't need to add other kind of function classes to
the reflect API.

Part of the fix for scala#16847
nicolasstucki added a commit that referenced this issue Feb 16, 2023
The old `FunctionClass` will need to be deprecated as we will remove
`ErasedFunctionN` and `ErasedContextFunctionN`. We will replace this API
with a simpler version that can return `FunctionN` or
`ContextFunctionN`, the only two stable function classes we have in the
compiler/TASTy.

Other new function classes will be encoded with the more general refined
function type encoding, generalization of the `PolyFunction` encoding.
This implies that we won't need to add other kind of function classes to
the reflect API.

Part of the fix for #16847
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metaprogramming:reflection Issues related to the quotes reflection API needs-minor-release This PR cannot be merged until the next minor release
Projects
None yet
Development

No branches or pull requests

1 participant