Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] [platform-dev] main vs test source causing annoyance

OK, I see it now that if my bundle doesn't have "test" attribute on the source folder (means it is for production) and depends on a project that is "test only" (like org.eclipse.text.tests), it is flagged as an error.
So it is good to have such errors, to avoid possible issues in production environment where the test bundle will be most likely not deployed.
So what is the problem? Just add the flag to test bundles you are working on and that's it.
 
It might have no value for you because you know which bundles are supposed to be deployed and which not in the production, but other people might not have that knowledge and happily consume API from the test projects inside production projects. Better prevent errors earlier.
 
Kind regards,
Andrey Loskutov

Спасение утопающих - дело рук самих утопающих

https://www.eclipse.org/user/aloskutov
 
 
Gesendet: Freitag, 28. Januar 2022 um 10:19 Uhr
Von: "Mickael Istria" <mistria@xxxxxxxxxx>
An: "Eclipse PDE general developers list." <pde-dev@xxxxxxxxxxx>
Cc: "Eclipse platform general developers list." <platform-dev@xxxxxxxxxxx>
Betreff: Re: [platform-dev] [pde-dev] main vs test source causing annoyance
 
 
On Fri, Jan 28, 2022 at 10:13 AM Andrey Loskutov <loskutov@xxxxxx> wrote:
Could you provide a concrete example of such error with explanation what and where is broken / wrong configured
 
I'm working in LSP4E, and consuming some test bundles from the SDK (DisplayHelper and other utilities). So far so good for the last years or so.
I usually have the dependencies in my target-platform (not that visibility of content is not influenced at all by the test flag here, it's plain PDE/OSGi resolution ruling), so far so good.
Now I open one of the Platform test bundles I depend on. It does configure the test flag for its source folder; then all of a sudden, my LSP4E test bundle show errors and PDE refuses to process it because it requires me to change a flag it order to see content of this bundle (which I can perferctly see in the PDE/OSGi world where this flag is absent).
So I have no other choice that setting this flag in LSP4E or I cannot develop. It's interrupting my workflow and I do not see any value to compensate this interruption; and luckily I know deeply all those projects to easily find how to remediate, I can imagine some people who are less aware of those things get lost.
 
how it can be improved?
 
Just removing the "not main code of the project, need a flag to consume" flag for the main content of those bundles would be correct.
 
Also I'm not sure PDE adds something to metadata to enforce this warning.
 
It has some operations that do set the flag according to the bundle name, but maybe not automatically, could be on import.
_______________________________________________ platform-dev mailing list platform-dev@xxxxxxxxxxx To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev

Back to the top