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

Changing the definition of a class doesn't force re-comp of derived givens in other files #22475

Open
j-mie6 opened this issue Jan 29, 2025 · 1 comment
Labels
area:implicits related to implicits area:typeclass-derivation itype:bug stat:needs minimization Needs a self contained minimization

Comments

@j-mie6
Copy link

j-mie6 commented Jan 29, 2025

Compiler version

3.6.2

Minimized code

In Schema.scala, I have this (top-level given):

given Schema[Flags] = Schema.derived

In another file I have

case class Flags(...)

When I edit the type, I'd expect the Schema to also get recompiled, because it is relying on derivation. Alas, it does not and only the file with the type gets recompiled. This means the given can get out of sync with the type.

If needed I can make a minimal working project tomorrow (this is using tapir)

Expectation

Changing a type would force recompilation of all derived things of that type.

@j-mie6 j-mie6 added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Jan 29, 2025
@Gedochao Gedochao added stat:needs minimization Needs a self contained minimization area:implicits related to implicits area:typeclass-derivation and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Jan 30, 2025
@Gedochao
Copy link
Contributor

If needed I can make a minimal working project tomorrow (this is using tapir)

@j-mie6 if you'd find the time, a minimized reproduction would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:implicits related to implicits area:typeclass-derivation itype:bug stat:needs minimization Needs a self contained minimization
Projects
None yet
Development

No branches or pull requests

2 participants