eclipse-cbi / targetplatform-dsl Goto Github PK
View Code? Open in Web Editor NEWTarget Platform Definition DSL and Generator
License: Eclipse Public License 2.0
Target Platform Definition DSL and Generator
License: Eclipse Public License 2.0
It is opened every time the editor is opened and this particular editor is not using it.
This is slightly annoying..
For reference : http://www.eclipse.org/forums/index.php?t=msg&th=208644/
It would be a great feature to have the possibility to force a reload of the available IU versions of the defined locations.
In the actual version we face a problem with new deployed versions of an IUs in one of the defined locations.
If we generate the .target file after the deployment the generated .target file didn't contains the new deployed version of the IU.
Until now the only chance to get the new version is to restart Eclipse and regenerate the .target file.
When a .target file is generated the platform/OS specific linefeed character(s) are used. It would be better if file/project/workspace/os settings were used instead.
It would be nice to have a code completion providing the available features when inside the scope of a location.
Of course, this can be time consuming so this should be done asynchronously
java.lang.IllegalStateException: Profile TARGET_DEFINITION:resource:/fr.obeo.presales.federation.environment/smartea.target is not current. Expected timestamp 1418735799543 but was 1418735783004.
at org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.lockProfile(SimpleProfileRegistry.java:758)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:67)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:44)
at org.eclipse.pde.internal.core.target.P2TargetUtils.resolveWithPlanner(P2TargetUtils.java:928)
at org.eclipse.pde.internal.core.target.P2TargetUtils.synchronize(P2TargetUtils.java:718)
at org.eclipse.pde.internal.core.target.IUBundleContainer.resolveBundles(IUBundleContainer.java:254)
at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolve(AbstractBundleContainer.java:77)
at org.eclipse.pde.internal.core.target.TargetDefinition.resolve(TargetDefinition.java:262)
at fr.obeo.releng.targetplatform.ui.handler.PDEIntegration.trySetTargetPlatform(PDEIntegration.java:68)
at fr.obeo.releng.targetplatform.ui.handler.PDEIntegration.setTargetPlatform(PDEIntegration.java:55)
at fr.obeo.releng.targetplatform.ui.handler.ConvertTargetPlatformJob.run(ConvertTargetPlatformJob.java:89)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
When using the tool on a newer Eclipse environment than the target should support (e.g. Using Eclipse 3.8 and describe a target platform that should work on eclipse 3.6), you always have to edit manually the .target to set the PDE Version.
It would be nice to be able to describe the PDE version directly in the .targetplatform file
Currently, an error popup open when we cancel a generation job. No one should be open as it is not an error.
The command should be fixed
Since #12, there is now an error reporting. But it is not optimized. For example with the following example (in which everything is OK, except the version of com.google.guava that does not exist):
target "target_with_resolution_pb"
location "http://download.eclipse.org/releases/juno" {
org.eclipse.pde;version=[3.8.0,3.9.0)
org.eclipse.platform;version=[4.2.1,4.3.0)
}
location "http://download.eclipse.org/tools/orbit/downloads/drops/S20130914154012/repository/" {
com.google.guava;version=[20.0.0,22.0.0)
}
location "http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases" {
org.eclipse.xtext.sdk.feature.group;version=[2.3.1,2.4.0)
}
The error message will be :
The file 'file:/pathToTarget/resolutionPb.targetplatform' can not be resolved.
OK
Error occured during resolution of 'http://download.eclipse.org/tools/orbit/downloads/drops/S20130914154012/repository/'.
The IU 'com.google.guava' with range constraint '[20.0.0,22.0.0)' can not be found.
OK
The "OK" lines are not necessary in this message.
I personally like to see which IU's are part of a location.
Now they are not alphabetically sorted by the formatter.
It would cool do have this.
This enhancement will let users put the include directive anywhere in the .tpd
files.
The overwriting rules between inclusions have to be refined to make distinction between
target A
include "i.tpd"
location "B.tpd"
and
target A
include "i.tpd"
location "B.tpd"
It's a supported version specifier, so should be proposed in completion.
I don't know if tit should be first or last. First would look like an encouragement to use it "by default", I'm not sure that's what you want. Putting it last would make it invisible in many cases where there are lots of versions.
When working with the Eclipse Release train, each project specifies and updates what will be contributed in the next milestone by updating a .b3aggrcon file.
The information there is the same as the targetplatform dsl parts, but in a different form.
I would like to be able to include in my targetplatform an HTTP url targetting such a file like : include "http://git.eclipse.org/c/simrel/org.eclipse.simrel.build.git/plain/amalgam.b3aggrcon"
That would allow me to specify : "use as the targetplatform whatever contribution is going to be made from amalgam for the next release train" and avoid the need of hunting down the repository URLS myself and checking from time to time if these repositories changed or not.
It would be nice to have an opportunity to set the environment inside the .tpd file.
We need this
win32 win32 x86as part of our .target file.
Many other features now present an updated version of the EPL from 2014 (just 2 lines changed), while yours is still the 2011 version. This leads to having multiple licenses in the confirmation dialog of P2. Can you please also update feature license?
You may take the Egit feature as reference.
The problem: I have a .targetplatform which references some public update-sites which can be considered mostly fixed, but also some internally build components which are re-built very often.
Currently when I generate a .target
, the full version of all bundles found at generation time is hard-coded in the resulting file. This means the .target
becomes obsolete as soon as a new build is published for the internal components.
One possibility would be an additional directive, maybe something like this:
com.example.component;version=latest
When this option is specified, the generation would create a version specifier of 0.0.0
(instead of a fixed, fully qualified version) so that the .target
still resolves when a new version of the component is published.
.targetplatform
tend to mix bundles from several repositories, and the resulting .target
have the same structure. Depending on multiple remote servers for a build can have performance and stability issues: it can be long to resolve a target platform which references half a dozen remote sites, some of which may not be very reliable.
It would be nice to have a mode in which a (potentially complex) .targetplatform
produces:
.target
which references that single local p2 repo instead of all the remote ones and all the bundles.The adavantages I see:
.target
file would probably be faster to load/resolve (both by PDE and Tycho) because it is local.Note that the URL of the (single) location referenced in the resulting .target
should be configurable, so that the repo can be published in a shared location (for example http://update.example.com/my.product/target).
The tool is great, but the workflow feels clumsy :
1- I edit my targetplatform file
2- I have to right-click to generate the .target file
3- I have to close this file and reopen it (if it was previously opened) because the .target editor don't seem to care about workspace change
4- I have to wait for the resolution to happen and never ever click on the "set as target platform button" before the job is finished
5- I click on the "set as target platform"
6- I look at my workspace, is everything compiling ? if not, come back to step 1.
This process is painful and is enough to makes Eclipse plugin development boring, you quickly ends up using "sdk" or "all" features to make sure everything will compile even if you don't need all of that.
The targetplatform tooling has the potential to work around all that and make my life easier ;)
Some proposals :
Trying to add the following to the target platform definition
location "http://download.eclipse.org/efxclipse/runtime-nightly/site" {
org.eclipse.fx.target.feature.feature.group
}
leads to mismatched input 'target' expecting RULE_ID
Manual adding of the resp. feature to the target file does work
This will require a lot of refactoring, but could be done without breaking the update capability.
It would be nice to have some kind of module system with reuse/include support in the .targetplatform
files. A functional equivalent of text-wise #include
would be enough to allow maintaining several related but not identical .targetplatform
in sync without resorting to manual copy/paste of text fragments whenever one of them changes.
Do not "increment" sequenceNumber, if it is the only difference with the previous generation.
When generating a .target
from a .targetplatform
, no error is reported even if some of the elements in the source file could not be found. The result in a .target
which does not contain what was expected, and you only discover it after a potentially long reload/full build when you see compilation errors in your workspace.
As Xtext always needs to have matching runtime and IDE plugins, installing this plugin can lead to an unwanted upgrade for developers working against an Xtext 2.6 target platform. Can this conflict somehow be solved? Do you really need the latest versions of the xtext plugins?
Unfortunately, I run into problems using the DSL.
The Editor works, code completion works, validation succeeds. I don't see the folder ./src-gen being created, and the content (Expecting a .target file).
I see xtext builder kicking in, what could be the problem.
I am on Kepler, and the installation of the DSL forced an upgrade of xtext. Which xtend version do you require?
btw, no errors in the error log.
Is it possible to specify slicer mode with includeAllPlatforms='false'
currently, putting allEnvironments, implies 'slicer' mode, but it forces includeAllPlatforms.
When used in combination with Maven Tycho, it is possible to define an id attribute in the repository tag.
<location includeAllPlatforms="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<repository id="orbit_S" location="http://download.eclipse.org/tools/orbit/downloads/drops/S20131024145017/repository/"/>
<unit id="javax.servlet" version="3.0.0.v201112011016"/>
<unit id="javax.servlet.source" version="3.0.0.v201112011016"/>
<unit id="javax.wsdl" version="1.6.2.v201012040545"/>
<!-- more units... -->
</location>
This allows applying some maven stuff (providing a password, a mirror…) for this repository
Example in the “.m2/settings.xml”:
<mirror>
<id>orbit_S</id>
<mirrorOf>orbit_S</mirrorOf>
<url>{{alternative url for orbit S repository}}</url>
<layout>p2</layout>
<mirrorOfLayouts>p2</mirrorOfLayouts>
</mirror>
From what I can tell, it does not seems to be supported by PDE:
org.eclipse.pde.internal.core.target.IUBundleContainer#serialize()
URI[] repositories = getRepositories();
if (repositories != null) {
for (int i = 0; i < repositories.length; i++) {
Element repo = document.createElement(TargetDefinitionPersistenceHelper.REPOSITORY);
repo.setAttribute(TargetDefinitionPersistenceHelper.LOCATION, repositories[i].toASCIIString());
//I was expecting: repo.setAttribute("id", ...);
containerElement.appendChild(repo);
}
}
I don't know if this problem comes from this tool or is more general to the platform. But when I try to install fr.obeo.releng.targetplatform-feature_3.8 from the repository http://mbarbero.github.com/fr.obeo.releng.targetplatform/p2/, I have this error during the install :
If I install the same feature from the repository http://mbarbero.github.com/fr.obeo.releng.targetplatform/p2/3.8/1.2.0.201309251321/, I have no problem.
With a targetplatform containing
location "myLocation" {
id.of.my.feature.feature.group
}
, the .target result is:
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="false" type="InstallableUnit">
<unit id="id.of.my.feature.feature.group" version="x.x.x.xxxxxxxx-xxxx"/>
<repository location="myLocation"/>
</location>
What I expect, is to have:
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="false" type="InstallableUnit">
<unit id="id.of.my.feature.feature.group" version="x.x.x.xxxxxxxx-xxxx"/>
<unit id="id.of.my.feature.source.feature.group" version="x.x.x.xxxxxxxx-xxxx"/>
<repository location="myLocation"/>
</location>
But
location "myLocation" {
id.of.my.feature.feature.group
id.of.my.feature.source.feature.group
}
is not possible because "source" is a "keyword". And with
location "myLocation" {
id.of.my.feature.feature.group
id.of.my.feature.^source.feature.group
}
I got this message:
No IU found for id.of.my.feature.^source.feature.group;version=="null"
For information, the "with source" option[1] only add source plugins but not source features.
[1] https://github.com/mbarbero/fr.obeo.releng.targetplatform#syntax
Hi,
I've a case with a qualifier that contains a minus character: org.eclipse.emf.eef.runtime-feature.feature.group.
I've tried to surround it with an escape character (^) but it does not work.
Any idea to handle this case?
Regards,
The tooling seems to have issues to detect source features.
Steps to reproduce:
When I add a feature with a specific version I will always get the newest version available in the repository.
Example:
location "http://download.eclipse.org/tools/orbit/downloads/drops/R20140114142710/repository" {
com.google.guava;version=11.0.2
}
Leads to this .target entry:
<unit id="com.google.guava" version="12.0.0.v201212092141"/>
The product could then be published on github.
I can select several .targetplatform files and launch the "Create Target Definition File". Though only the first selected file will be processed.
It would be nice to have the ability to add the location type "directory", which is supported by the Target Platform. Including using variables using the variable manager.
The following fragment in the file won't work:
location "http://download.eclipse.org/releases/kepler" {
org.eclipse.acceleo.source.feature.group
}
The editor complains with: "mismatched input 'source' expecting RULE_ID"
PS: But I really like the idea of the editor!
With version 1.2, the fr.obeo.releng.targetplatform.targetPlatform.converter
application could take raw file names as arguments (e.g. sirius_luna.targetplatform
). Since version 2.0, this fails silently (the .target
is simply not created/updated), and one has to use a full-blown URI like file:/$(pwd)/sirius_luna.targetplatform
instead.
In a file like this
target "Kepler 4.3 SDK" location "http://download.eclipse.org/releases/kepler" location "http://download.eclipse.org/modeling/emf/emf/updates/releases/" location "http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/" location "http://download.itemis.de/updates"
The location http://download.eclipse.org/releases/kepler
will be at the third position in the result file
I would love to have a feature to define the name of the target file.
Tycho needs a target file to be named .target
So I would like to create several tpd files in my project which would overwrite the same target file. This would allow to switch the build target quite easily, without renaming/moving files around.
Hey,
We have a target platform that is composed out of multiple locations. We want to go "with requirements", but there is one single site, where dependencies are not easily resolvable without a complete runtime environment. Thus we have to live without dependency resolution just because of one single stupid feature :|
I know that PDE does not support the "with requirements" per update site mode (you have it for all, or not at all), but we talked at EclipseCon and you said you might be able to come up with something - so this is your reminder :)
Cheers,
Markus
It would be nice to be able to plug EMFCompare 2 so that model comparaison is used to compare 2 targetplatform files (for the time being, a textual comparaison is used so if the order of the location definitions changed it is hard to see what actually changed)
I have some problems considering include statements if the workspace is not flat. In particular, the projects are in subdirectories within the workspace folder:
workspace
+- repoA +- targetA
+- repoB +- targetB
Nevertheless, the workspace layout is non-hierarchical:
workspace
+- targetA
+- targetB
Each of the projects has got a target file. The target file present in targetB includes the one in targetA. I reduced the target files to:
target "Exemplary Parent Target"
location "http://download.eclipse.org/tools/orbit/downloads/drops/R20140114142710/repository" {
org.slf4j.api
}
and
target "Exemplary Child Target"
// link resolved by editor
//include "../targetA/targetA.tpd"
// link resolved by command
include "../../repoA/targetA/targetA.tpd"
location "http://download.eclipse.org/tools/orbit/downloads/drops/R20140114142710/repository" {
org.slf4j.jul
}
The UI requests me to do an include according to the workspace layout:
// link resolved by editor
include "../targetA/targetA.tpd"
The command exits saying it cannot find the referenced file. If I change the link to a version that respects the disk layout the command works (and the ui reports an error).
// link resolved by command
include "../../repoA/targetA/targetA.tpd"
The following file produces a correct .target
:
target "acceleo-3.4"
with source, requirements
location Acceleo-3_4 "http://download.eclipse.org/acceleo/updates/releases/3.4/" {
org.eclipse.acceleo.doc.feature.group;version=[3.0.0,4.0.0)
org.eclipse.acceleo.examples.feature.group;version=[3.0.0,4.0.0)
org.eclipse.acceleo.feature.group;version=[3.0.0,4.0.0)
org.eclipse.acceleo.runtime.feature.group;version=[3.0.0,4.0.0)
org.eclipse.acceleo.sdk.feature.group;version=[3.0.0,4.0.0)
org.eclipse.acceleo.ui.capabilities.feature.group;version=[3.0.0,4.0.0)
}
This one, which references a p2 repo which does not exist yet, "fails" silently: nothing in the error log, no .target created (or updated if it exists), no message:
target "acceleo-3.5"
with source, requirements
location Acceleo-3_5 "http://download.eclipse.org/acceleo/updates/releases/3.5/" {
org.eclipse.acceleo.doc.feature.group;version=[3.0.0,4.0.0)
org.eclipse.acceleo.examples.feature.group;version=[3.0.0,4.0.0)
org.eclipse.acceleo.feature.group;version=[3.0.0,4.0.0)
org.eclipse.acceleo.runtime.feature.group;version=[3.0.0,4.0.0)
org.eclipse.acceleo.sdk.feature.group;version=[3.0.0,4.0.0)
org.eclipse.acceleo.ui.capabilities.feature.group;version=[3.0.0,4.0.0)
}
On Luna i can not install the 2.1 version with the following message.
An error occurred while collecting items to be installed
session context was:(profile=epp.package.rcp, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,fr.obeo.releng.targetplatform,2.1.0.201406290942
No repository found containing: osgi.bundle,fr.obeo.releng.targetplatform.ui,2.1.0.201406290942
No repository found containing: org.eclipse.update.feature,fr.obeo.releng.targetplatform-feature,2.1.0.201406290942
I have added the XText Update site as provided on your documentation.
This issue is about providing a build-compatible mechanism (e.g. ant or mvn task) to re-generate the TP at the very beginning of a build.
This would avoid to manually re-generate TP any time a new minor version is available on the referenced update sites.
Currently a location needs to have a trailing slash to be resolved (at least for context completion).
Ev. you could check and add it automatically when resolving
As long as PDE does not handle those directives per location, it does not make sense to make the same mistake as them.
This may need a backward incompatible change in the grammar. Will need to
investigate how to handle that properly.
Source formatting for comments within locations does not indent the first comment if it is located before any item
eg
location ... {
//some comment
org.eclipse....
}
trivial, but looks ugly :)
Thanks for this great tool,
It would be nice if code completion could present IU's grouped by category, and also by version for the IU's with same namespace and name.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.