Home » Modeling » TMF (Xtext) » Why are optional dependencies in Xtext greedy?
Why are optional dependencies in Xtext greedy? [message #1221733] |
Wed, 18 December 2013 10:12 |
Matthieu Wipliez Messages: 30 Registered: March 2010 |
Member |
|
|
Hi,
I am trying to build a product based on Xtext, without JDT ui. I am using Tycho for the build, and I have configured my target platform to ignore optional dependencies. However, p2 still installs the jdt.ui bundle in the final product.
After some time investigating this, I saw that Xtext uses optional, greedy dependencies, but the default since Juno M1 is that optional dependencies are non-greedy. This is what causes jdt.ui to be included even if it is marked optional.
I have solved this by filtering out jdt.ui, but still I was wondering:
Why are you using optional greedy dependencies?
Thank you,
Matthieu
|
|
|
Re: Why are optional dependencies in Xtext greedy? [message #1222367 is a reply to message #1221733] |
Fri, 20 December 2013 08:54 |
Sven Efftinge Messages: 1823 Registered: July 2009 |
Senior Member |
|
|
It is for backwards compatibility. Especially with regards to the
experience after updating. If we had followed the new convention and
have optional deps non greedy, a lot of people would have had to add
explicit dependencies.
Sven
Am 18/12/13 11:12, schrieb Matthieu Wipliez:
> Hi,
>
> I am trying to build a product based on Xtext, without JDT ui. I am
> using Tycho for the build, and I have configured my target platform to
> ignore optional dependencies. However, p2 still installs the jdt.ui
> bundle in the final product.
>
> After some time investigating this, I saw that Xtext uses optional,
> greedy dependencies, but the default since Juno M1 is that optional
> dependencies are non-greedy. This is what causes jdt.ui to be included
> even if it is marked optional.
>
> I have solved this by filtering out jdt.ui, but still I was wondering:
> Why are you using optional greedy dependencies?
>
> Thank you,
> Matthieu
--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
|
|
| | | |
Re: Why are optional dependencies in Xtext greedy? [message #1454644 is a reply to message #1454611] |
Tue, 28 October 2014 16:07 |
Matthieu Wipliez Messages: 30 Registered: March 2010 |
Member |
|
|
Uli Merkel wrote on Tue, 28 October 2014 11:25Still for APIs and functionality there is a commitment to support compatibility issues.
Uli, I feel like I'm missing something here. What compatibility are you referring to, and how making optional dependencies non-greedy would impact compatibility?
By default, product builds pull all optional dependencies unless specified otherwise. This won't change, greedy or not. What changes is that if you don't want optional dependencies (for example I don't want JDT in my product), that is if you specify *explicitly* something, then it will behave as expected (not including something that is marked as optional).
Users of plugins supporting Xtext-based DSLs either already have JDT (since it is installed when you install Xtext), or they don't if they're using a product that explicitly filters out JDT (like I did in my product). If they already have JDT, changing from greedy to non-greedy won't make a difference for them.
So, the only thing that would change, as far as I can see, is for developers who make Xtext-based plugins that rely on JDT, but who are not aware of it, and who don't use Xbase (if they use Xbase, they are well aware that JDT is required). So for those, for compatibility, maybe the generator could add requirements to jdt.core/jdt.ui? Or maybe there is even another way, maybe something simpler than specify x-installation:="greedy" on every optional dependency
Uli Merkel wrote on Tue, 28 October 2014 11:25Just had the fun to make some 800 "minor modifications" caused by a broken compatibility promise
I know that this is painful. Xtext is an *awesome* framework, and I've been using it for a few years already, even at versions pre-1.0, when things used to break at almost every release ^^
|
|
| | | | | | |
Goto Forum:
Current Time: Thu Apr 25 13:42:51 GMT 2024
Powered by FUDForum. Page generated in 0.03895 seconds
|