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

Zinc doesn't notice that implicit keyword has been removed from a method #945

Open
dwijnand opened this issue Nov 19, 2020 · 1 comment
Open
Labels

Comments

@dwijnand
Copy link
Member

In incremental builds the compiler doesn't notice that implicit keyword has been removed from a method and still uses the now not implicit definition instead of rerunning the search, but I assume this is well known.

Originally posted by @noresttherein in scala/bug#12231 (comment)

@noresttherein
Copy link

I must add that it certainly is not always so and I tried to provide a minimized example without success, but these things, depending on the history of changes, are tricky. Just in order to not look like an idiot, here it is in the wild:
oldsql commit

Reproduction steps:
in src/tests/scala/playground.scala (or any scratch file, for that matter) put:

	println(scala.reflect.runtime.universe.reify (
		implicitly[SQLReadForm[Option[Int]]]
	).tree)

It should print:

Predef.implicitly[SQLReadForm[Option[Int]]](SQLForms.OptionColumnReadForm(SQLForms.IntForm))

Then:
1. navigate to src/main/scala/net/noresttherein/oldsql.schema/forms/SQLForms.scala
2. find trait ColumnRWFormsImplicits
3. remove the implicit keyword from method OptionColumnReadForm
4. recompile
5. run playground or your scratch file again

The result is the same as before, while it should print:

Predef.implicitly[SQLReadForm[Option[Int]]](SQLForms.OptionSQLReadForm(SQLForms.IntForm))

I might have a go at it minimizing it again, but for now fighting with other issues with implicits made me almost cry and I need a break.

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

No branches or pull requests

2 participants