Implicits 'lost' causing erroneous compilation errors, 'clean' gets things back to normal
I would often find myself making changes to my code, and causing an error or two, then all of a sudden Eclipse reporting 412 errors to me, all related to implicits being missing. I'd then clean the project, and be back to the real errors.
I've recreated this problem in a simple project, attached.
1. Open the project in Eclipse (I used Galileo 3.5.2 x64, with Scala IDE 2.8.1 final)
2. Clean the project, to ensure it builds error free
3. Open foo.scala in the IDE
4. rename trait Foo to Foo2, save the file
5. See 1 compilation error: not found: type Foo Foo.scala /ImplicitTest/src/main/scala/com/test line 7 Scala Problem
6. rename trait Foo2 to Foo, save the file
7. See 1 compilation error: type mismatch; found : java.lang.String("blah") required: com.test.CaseInsensitive Dummy.scala /ImplicitTest/src/main/scala/com/test line 4 Scala Problem
8. Clean the project
9. See no compilation errors
The error shown on step 7 shouldn't have been shown, something screwed up.
Note: With this micro project, sometimes thing were a bit finicky for me, I'd introduce an error (by changing Foo to Foo2), hit save, and the presentation compiler would show the error in the source but Eclipse wouldn't show the error in "problems" tab at the bottom. Not sure whats up there, but a clean, or reopen would usually avoid that issue.
I've recreated this problem in a simple project, attached.
1. Open the project in Eclipse (I used Galileo 3.5.2 x64, with Scala IDE 2.8.1 final)
2. Clean the project, to ensure it builds error free
3. Open foo.scala in the IDE
4. rename trait Foo to Foo2, save the file
5. See 1 compilation error: not found: type Foo Foo.scala /ImplicitTest/src/main/scala/com/test line 7 Scala Problem
6. rename trait Foo2 to Foo, save the file
7. See 1 compilation error: type mismatch; found : java.lang.String("blah") required: com.test.CaseInsensitive Dummy.scala /ImplicitTest/src/main/scala/com/test line 4 Scala Problem
8. Clean the project
9. See no compilation errors
The error shown on step 7 shouldn't have been shown, something screwed up.
Note: With this micro project, sometimes thing were a bit finicky for me, I'd introduce an error (by changing Foo to Foo2), hit save, and the presentation compiler would show the error in the source but Eclipse wouldn't show the error in "problems" tab at the bottom. Not sure whats up there, but a clean, or reopen would usually avoid that issue.
Leave a comment
on 2011-01-07 09:23 *
By David Bernard
Thanks for providing a sample project to reproduce. I'll try it on master and wip_exp_backport.
If I try to fix(don't have lot of time for), it will be on wip_exp_backport, (possible transpose to master after).
Until I'll start working on it, I let Miles as assignee
If I try to fix(don't have lot of time for), it will be on wip_exp_backport, (possible transpose to master after).
Until I'll start working on it, I let Miles as assignee
on 2011-01-07 13:18 *
By David Bernard
Assigned to changed from login to David Bernard
Status changed from New to Accepted
I can reproduce the buggy behaviors (including note) on wip_exp_backport.
on 2011-01-10 14:40 *
By David Bernard
(In revision:c0c79b41097a0eedf52c2057d161f4c970ecc9e7) add tuning option to always run clean+build
(quick workaround see #1000220)
Branch:wip_exp_backport
(quick workaround see #1000220)
Branch:wip_exp_backport
Updating tickets (#1000199, #1000200, #1000201, #1000204, #1000205, #1000209, #1000210, #1000211, #1000212, #1000215, #1000217, #1000218, #1000220, #1000222, #1000226, #1000227, #1000228, #1000230, #1000231, #1000232, #1000233, #1000235, #1000236, #1000237, #1000239, #1000240, #1000241, #1000242, #1000243, #1000244, #1000248, #1000249, #1000252, #1000253, #1000254, #1000255, #1000256, #1000258, #1000259, #1000032, #1000059, #1000062, #1000163, #1000197, #1000216, #1000221, #1000224, #1000121, #1000175, #1000219, #1000251, #1000069, #1000195, #1000213, #1000223, #1000006, #1000021, #1000038, #1000048, #1000051, #1000052, #1000075, #1000103, #1000109, #1000115, #1000119, #1000156, #1000186, #1000207, #1000238, #1000262, #1000263, #380, #389, #683, #1238, #1331, #1635, #1645, #1715, #1729, #1744, #1783, #1839, #1869, #1885, #1890, #1902, #1918, #1919, #1924, #1925, #1946, #1964, #1991, #2131, #2233, #2342, #2348, #2408)
Closing as invalid.
I cannot reproduce the problem on both 2.0.0-2.8 and master-2.10.
With the refined builder, I can see the problem not updated error in the problem view and the editor, but not the implicit problem.
With the sbt builder, I didn't see any problem.
This has likely been fixed during 2.0 development.
Please reopen with additional information if you still see the problem.
I cannot reproduce the problem on both 2.0.0-2.8 and master-2.10.
With the refined builder, I can see the problem not updated error in the problem view and the editor, but not the implicit problem.
With the sbt builder, I didn't see any problem.
This has likely been fixed during 2.0 development.
Please reopen with additional information if you still see the problem.