Skip to content

Add Photon target - #149

Merged
erwint merged 1 commit into
m2e-code-quality:developfrom
victornoel:photon
Sep 24, 2018
Merged

erwint merged 1 commit into
m2e-code-quality:developfrom
victornoel:photon

Conversation

@victornoel

Copy link
Copy Markdown
Contributor

Closes #121

I extracted from #121 what seemed to be still relevant.

I agree with #115 that the constraint should be up to v2.

I fixed the version of the various quality control tools in the target, but let the eclipse stuffs at version 0.0.0 to always build against the latest of the Photon update site. Maybe that's a mistake, I can change that.

There is something I'm really not clear about, Eclipe build is always such a mess:

  • According to Not compatible with Photon? #120, our current build is already compatible with Photon, so why is there a need for a specific target?
  • I updated the content of the m2e-code-quality.setup file but I have absolutely no idea what is it for. It seems to duplicate information we can find both in the targets and in the pom.xml…
  • The update sites in the pom.xml doesn't seem to even be the correct ones, for example for checkstyle.
  • I couldn't find where in travis is configured the place where things are generated for the various target, I suppose this is related to Automatic continous deployment of develop branch to a (new) update site #123?

@vorburger

Copy link
Copy Markdown
Member

@victornoel cool, thanks! I'll answer Qs above in the coming days (may be not tomorrow; busy).

@erwint if you could help to review this in the mean time (and answer Qs) - much appreciated!

@erwint

erwint commented Sep 21, 2018

Copy link
Copy Markdown
Member

I can only anwer the question about the setup file. By this you define which update sites to use depending on the product version selection (phton, oxygen, ...). Actually, I was wondering how to do this exactly in Oomph, nice to see an example.

@victornoel

Copy link
Copy Markdown
Contributor Author

@erwint and do we need it? If yes, how do we exploit it? Maybe we should document that… is that for the users or for the devs?

Comment thread m2e-code-quality.setup
url="https://dl.bintray.com/eclipse-cs/eclipse-cs/8.0.0/"/>
<repository
url="https://dl.bintray.com/pmd/pmd-eclipse-plugin/updates/"/>
</repositoryList>

@erwint erwint Sep 21, 2018 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m2e dependency is missing

<repository
            url="http://download.eclipse.org/technology/m2e/milestones/1.9"/> 

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victornoel will you add it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vorburger @erwint yes, good point :)

@erwint

erwint commented Sep 21, 2018

Copy link
Copy Markdown
Member

I tried out the setup. It seems it is only used for the target platform definition, which defaults to "Neon" but can be changed on the variables page of the installer. So AFAICT this is not strictly needed, only if some day we will require a newer target platform, then we already have a matching set at hand. As it's already done for all the other version, I would indeed add it.

Comment thread pom.xml Outdated

<properties>
<target.platform>oxygen</target.platform>
<target.platform>photon</target.platform>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not change that, indeed it makes sense to set this to the minimum (!) target supported. This should be the same value used in the .setup file as the default value of the eclipse.target.platform variable.

I did not find any reference to what minimum Eclipse version we support. I would suggest using some mildly recent on like Mars or Neon.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erwint ok I will keep that to oxygen then :)

@vorburger

vorburger commented Sep 22, 2018 •

Copy link
Copy Markdown
Member

According to #120, our current build is already compatible with Photon, so why is there a need for a specific target?

I think that we would only really "need" the new .target if we wanted to use any Photon APIs. Say for using https://bugs.eclipse.org/bugs/show_bug.cgi?id=539248 from #140. (Although one could attempt to only build against latest M2E 1.10.0 but mixed on earlier Eclipse; but that may lead to other problems; so typically people follow the Eclipse "release train" globally - AFAIK.)

The idea is also to build against several .target to detect e.g. a removal of a deprecated API in a newer Eclipse version that is still used in a project. But I removed that (had to, unless someone has a better idea) in #134 😈

I updated the content of the m2e-code-quality.setup file but I have absolutely no idea what is it for. It seems to duplicate information we can find both in the targets and in the pom.xml…

The way this project is currently configured, those .setup files are useful only for developers, they drive Oomph. They are not currently used by the build of this project at all. (But it's possible to unify this, see #135 ... )

@erwint and do we need it? If yes, how do we exploit it? Maybe we should document that… is that for the users or for the devs?

The README kind of explains it - improve it, if not not clear enough?

The update sites in the pom.xml doesn't seem to even be the correct ones, for example for checkstyle.

I'm not 100% sure but I actually think there could be a bit of mess in the project around this... Again, I forgot the exact details from when I last work on stuff like this, but from what I remember you chooose if you want Tycho to use a TP defined by POM -OR- by .target... and we may have a mix; it's possible you can remove the update sites in the pom.xml and it still works; try, if you have the time.

I couldn't find where in travis is configured the place where things are generated for the various target, I suppose this is related to #123?

Travis really just do much at all here, just what we tell it to in .travis.yml - right now just mvn --batch-mode clean install - because of #134 (before it did a "matrix build").

Actually, I was wondering how to do this exactly in Oomph, nice to see an example.

you can find more Oomph stuff in my https://github.com/vorburger/opendaylight-eclipse-setup/blob/master/org.opendaylight.projects.setup, if you are interested.

BTW @victornoel to learn more about Tycho, check out https://www.eclipse.org/tycho/documentation.php

As it's already done for all the other version, I would indeed add it.

agreeed, let's get this merge, after @victornoel fixing the point you raised @erwint found?

Hope these explanations are somewhat helpful. I'm hoping not to get too involved in this kind of stuff anymore... 😸

@victornoel

Copy link
Copy Markdown
Contributor Author

@vorburger thanks for the explanation, Eclipse/Tycho/Oomph/etc is such a mess ;)

So if I understand well: ideally we should just have one setup file, nothing in the pom related to update sites, we should generate target files from it, we should release for the lowest supported eclipse version and travis should test all eclipse version to ensure no API are missing/changed?
We are far from this, but we have something working ok now at least :)

Anyway, all of this is out of scope of this MR, we can take decision on those things in #135 I suppose.

So let's merge this (after I make the two changes) since we have it, but basically, it's not used at all for now :)

@victornoel victornoel changed the title Add Photon target and set as default for build Add Photon target Sep 22, 2018
@victornoel

Copy link
Copy Markdown
Contributor Author

@erwint @vorburger it should be ok. I had also forgotten m2e in the target file. Same as with eclipse, I used 0.0.0 versions.

@victornoel

Copy link
Copy Markdown
Contributor Author

Well, actually, if you could wait a bit more, I'm looking into simplifying some stuffs in the other targets too and in the pom.xml. I will put that in a second commit so we can decide if we want it or not :)

@victornoel

Copy link
Copy Markdown
Contributor Author

I abandoned the idea, it's impossible to make those thing work nicely, too much effort for nothing ^^

I just updated the photon target because there was way too much things in it.

@erwint
erwint merged commit 715f221 into m2e-code-quality:develop Sep 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants