Configure Eclipse according to current project state [message #1403100] |
Mon, 21 July 2014 11:34 |
Boris Brodski Messages: 112 Registered: July 2009 |
Senior Member |
|
|
Hello,
I use Xtext to create a DSL (domain specific language). Xtext produces a bunch of plugins, that should be installed into Eclipse to add support for the DSL.
I use the DSL in my project to generate java code. I also continually develop the DSL adding new features and upgrading it to the new Xtext versions.
This means, that some particular state of my project (commit/branch/tag) depends on a corresponding version of the DSL-plugins. The DSL-plugins on the other hand depend on a corresponding version of Xtext.
My goal is to be able to check out any commit of my project and get it compiled without investigating and down/upgrading Xtext and DSL plugins manually.
Example:
DSL 1.x depends on Xtext 2.4.3
DSL 2.x depends on Xtext 2.6.2
Tag X of my project depends on DSL 1.0
Tag Y of my project depends on DSL 1.2
Tag Z of my project depends on DSL 2.0
'git checkout X' should automatically install DSL 1.0, Xtext 2.4.3
'git checkout Z' should automatically install DSL 2.0, Xtext 2.6.2
'git checkout Y' should automatically install DSL 1.2, Xtext 2.4.3
The idea, how it can be done with Oomph
---------------------------------------
The project should store and manage a file 'eclipse-configuration.setup', that contains a "P2 Director" section describing required Xtext & DSL versions.
After git checkout (or a build event or just a button click) Oomph loads the file from the workspace checking and installing correct versions of Xtext and DSL plugins as necessary.
Here are my questions:
- Is it possible to implement this using the current version of Oomph?
- Is it the right way of doing this kind of thing?
I'm sure that this problem is common at least among Xtext users with middle and large projects. I also would like to contribute to Oomph to make this kind of scenario one of the officially supported features.
Thank you!
Cheers,
Boris
|
|
|
Re: Configure Eclipse according to current project state [message #1403290 is a reply to message #1403100] |
Mon, 21 July 2014 13:54 |
Ed Merks Messages: 33139 Registered: July 2009 |
Senior Member |
|
|
Boris,
Comments below.
On 21/07/2014 1:34 PM, Boris Brodski wrote:
>
> I use Xtext to create a DSL (domain specific language). Xtext produces
> a bunch of plugins, that should be installed into Eclipse to add
> support for the DSL.
Like I have for Xcore.
>
> I use the DSL in my project to generate java code. I also continually
> develop the DSL adding new features and upgrading it to the new Xtext
> versions.
>
> This means, that some particular state of my project
> (commit/branch/tag) depends on a corresponding version of the
> DSL-plugins. The DSL-plugins on the other hand depend on a
> corresponding version of Xtext.
I see.
>
> My goal is to be able to check out any commit of my project and get it
> compiled without investigating and down/upgrading Xtext and DSL
> plugins manually.
Downgrading is always difficult. I'm not sure the P2 Task would install
a downgraded version if asked to do so. It might. I haven't tried.
>
> Example:
>
> DSL 1.x depends on Xtext 2.4.3
> DSL 2.x depends on Xtext 2.6.2
>
> Tag X of my project depends on DSL 1.0
> Tag Y of my project depends on DSL 1.2
> Tag Z of my project depends on DSL 2.0
>
> 'git checkout X' should automatically install DSL 1.0, Xtext 2.4.3
> 'git checkout Z' should automatically install DSL 2.0, Xtext 2.6.2
> 'git checkout Y' should automatically install DSL 1.2, Xtext 2.4.3
>
>
> The idea, how it can be done with Oomph
So one idea is that you maintain this in your MyDSL.setup. As you
progress in your development you commit new versions of this. Presumably
you maintain branches as well. At at point when you fork off a new
branch, you create a new stream in the setup to "lock in" your tasks for
that stream. Probably that means copying your master stream, renaming
it to match your branch.
> ---------------------------------------
>
> The project should store and manage a file
> 'eclipse-configuration.setup', that contains a "P2 Director" section
> describing required Xtext & DSL versions.
Note that one of the tasks you can specify is a redirection task. For
example, you can redirection your MyDSL.setup (the URL used to point at
this setup from the catalog), so that it points at your local git clone
version of that setup. Then no matter which branch of commit you check
out, you'll get the corresponding version of MyDSL.setup that applied at
historical version of that commit. If you were to update the Oomph
installation, it will use that version to do it's normal thing.
>
> After git checkout (or a build event or just a button click) Oomph
> loads the file from the workspace checking and installing correct
> versions of Xtext and DSL plugins as necessary.
>
>
> Here are my questions:
> - Is it possible to implement this using the current version of Oomph?
I think if you updated your MyDSL.setup as you develop so that's
up-to-date with respect to each commit, it should just work. Of course
installing from the catalog from scratch will only let you choose from
the stream you're interested it, so it's nice to maintain a proper
branch structure for your history.
> - Is it the right way of doing this kind of thing?
>
>
> I'm sure that this problem is common at least among Xtext users with
> middle and large projects. I also would like to contribute to Oomph to
> make this kind of scenario one of the officially supported features.
I think in combination with redirecting the catalog's setup version of
your URI, to the version you have in git itself, you'd have what you
needed. Certainly I do this kind of thing as well, though it's more
focused on maintaining well defined stream/branches.
>
> Thank you!
>
>
> Cheers,
> Boris
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03771 seconds