[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| Re: [platform-dev] main vs test source causing annoyance | 
> What do you think?
1) making a rule that forbids marking tests as "test" is really not 
helping in any case but only shows we try to fix  a broken concept.
2) The concept of "test-fragments" is and was always broken, its just 
PDE that refuses to support common concepts and thus we where forced to 
use them for years leading to hard to find, hard to manage and hard to 
run tests.
So it would be better to (now that Tycho supports this and its still 
possible to run them in JDT/PDE) migrate to either
a) put *unit* tests that test /internal/ state (e.g. not exported API) 
in a 'src_test' folder
b) put *integration* tests that test the /exported/ state (e.g. public 
exported API, interaction with the UI) ...
then there is no need for "test-fragments" and no need for annoyance and 
all this maps perfectly to whats common to most developers.
> 1. it's "contaminating": changing it requires downstream consumers to
> also act on their .classpath to get things working again
I would say it gives consumers a "valuable warning that they do assume 
wrong things" :-)
> 2. it's adding no value in the traditional plugin development workflow
It does as the "traditional plugin development workflow" was always a 
workaround because the tools we are using refused to support this. As 
this is different now I don't see any reason for keeping this workarounds.
> 3. it can even cause troubles now that support for test folders in
> Plugins can be interpreted differently by PDE or Tycho (just like
> tests in Maven world).
They are not interpreted differently, PDE simply do not make any 
distinction (JDT does!).
By the way its not PDE adding that meta-data as far as I know, the only 
one doing it automatically is m2eclipse.
Am 28.01.22 um 09:21 schrieb Mickael Istria:
Hi,
I'm seeing more and more frequently in my workbench errors such as 
"Project has only main sources but depends on project 
'org.eclipse.text.tests' which has only test sources." which prevents 
from developing as JDT refuses to build in such case. That was 
implemented in https://bugs.eclipse.org/bugs/show_bug.cgi?id=539998 
<https://bugs.eclipse.org/bugs/show_bug.cgi?id=539998> and made more 
frequent as more and more bundles added test information in there 
.classpath.
I think overall, this practice is a bad idea for Eclipse plugin 
development and for Platform, because
1. it's "contaminating": changing it requires downstream consumers to 
also act on their .classpath to get things working again
2. it's adding no value in the traditional plugin development workflow
3. it can even cause troubles now that support for test folders in 
Plugins can be interpreted differently by PDE or Tycho (just like tests 
in Maven world).
I think we should act on fixing those .classpath and emit a rule to not 
use those "test" metadata on test bundles. Also, we should probably make 
PDE *not* add those metadata for plugins by default.
There would be less trouble and no loss as far as I know.
What do you think?
--
Mickael Istria
Eclipse IDE <https://www.eclipse.org/eclipseide> developer, for Red Hat 
Developers <https://developers.redhat.com/>
_______________________________________________
platform-dev mailing list
platform-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev