Git Product home page Git Product logo

targetplatform-dsl's People

Contributors

bananeweizen avatar hannesn avatar haubi avatar mbarbero avatar merks avatar miklossy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

targetplatform-dsl's Issues

Add capability to reload IUs from defined locations

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.

Completion for features

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

Exception occurred when trying to update a target definition

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)

Set PDE version in .targetplatform file

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

Reporting is not optimized

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.

Sort IU under location.

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.

It should be possible to add an include anywhere in the file

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"

Version number completion should propose "lazy"

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.

Include b3aggrcon files

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.

update EPL

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.

Allow the generation of more flexible .target in terms of versions

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.

Support resolution of complex .targetplatform into a single aggregate repo + .target

.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:

  1. a single, local p2 repo which mirrors everything (metadata and artifacts) references in the source file
  2. a .target which references that single local p2 repo instead of all the remote ones and all the bundles.

The adavantages I see:

  1. I have no hard data to prove this, but the resulting .target file would probably be faster to load/resolve (both by PDE and Tycho) because it is local.
  2. It would definitly be more reliable as the build would not depend anymore on the accessibility of the original remote update site.
  3. It would make the build more reproducible, as the resulting repo is fixed. When referencing remote sites you are never sure a new version of some component will not appear with no warning.
  4. It would make the fully resolved target platform used for a project versionable (e.g. in a Git repo), including branching and tagging, to ensure even more reproductibility.

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).

Add a convenient way to set the current targetplatform file as the targetplatform

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 :

  • when I save generate the .target file and then if the .target file is the current target platform, trigger the resolution + setting of this target platform

Resolving UI with String "target" as part of it does not resolve

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

Support reuse of targetplatform files

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.

Error reporting

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.

Side effects from dependencies

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?

[bug] gen folder not created

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.

id attribute in the repository tag

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);
       }
}

Error during install on Kepler 4.3.0

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 :

  • An error occurred while collecting items to be installed
    session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
    ** No repository found containing: osgi.bundle,fr.obeo.releng.targetplatform,1.2.0.201309251321
    ** No repository found containing: org.eclipse.update.feature,fr.obeo.releng.targetplatform-feature_3.8,1.2.0.201309251321
    ** No repository found containing: osgi.bundle,fr.obeo.releng.targetplatform.pde-util_3.8,1.2.0.201309251321
    ** No repository found containing: osgi.bundle,fr.obeo.releng.targetplatform.ui,1.2.0.201309251321

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.

Impossible to include source feature in TP

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

A qualifier with a minus is not handled

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,

Allow adding location of type "directory"

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.

Adding a IU with the token "source" is not possible

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!

The command-line IApplication has changed its way of interpreting its arguments

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.

Order of locations in the source file is not kept after conversion

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

allow to define target filename in tpd 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.

with requirements, but not for all locations

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

Tooling to compare & merge .targetplatform files

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)

Different include lookup for XText-editor and popup-command

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"

No feedback when a definition references an invalid p2 repo

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)
}

Installation on Luna

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.

Be able to launch TP re-generation during build

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.

location needs trailing slash to resolve

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

Source format for comments

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 :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.