Skip to content

Fix typo in GOOMPH_PDE_UPDATE_SITE property#48

Merged
nedtwigg merged 4 commits intodiffplug:masterfrom
hacki11:fix-pde-install-typo
Feb 5, 2018
Merged

Fix typo in GOOMPH_PDE_UPDATE_SITE property#48
nedtwigg merged 4 commits intodiffplug:masterfrom
hacki11:fix-pde-install-typo

Conversation

@hacki11
Copy link
Contributor

@hacki11 hacki11 commented Jan 8, 2018

No description provided.

@nedtwigg
Copy link
Member

nedtwigg commented Jan 8, 2018

Ha! Sorry, this sort of bug is very frustrating to find.

I think we need to at least throw a warning if "UDPATE" is defined. There are users who are using this now, typo and all - don't want to break them silently.

@hacki11
Copy link
Contributor Author

hacki11 commented Jan 9, 2018

good point, i can add this.

do you know how to get a offline update site zip to provide the pde update site let's say for 4.6.3?

@nedtwigg
Copy link
Member

nedtwigg commented Jan 9, 2018

@hacki11
Copy link
Contributor Author

hacki11 commented Jan 9, 2018

with this i do not get a valid eclipse update-site-archive which can then be used as UPDATE_SITE.
(e.g. artifacts.jar, content.jar is missing)

@hacki11
Copy link
Contributor Author

hacki11 commented Jan 9, 2018

ok, i extracted the package and faked the 'installed' file. now PDEInstallation does not redownload from eclipse update site.

would be awesome to have the p2-bootstrap feature with pde,too

@nedtwigg
Copy link
Member

nedtwigg commented Jan 9, 2018

I am confused :) Happy to take any PRs though.

hacki11 added 3 commits February 4, 2018 15:19
@hacki11
Copy link
Contributor Author

hacki11 commented Feb 4, 2018

i have added the downwards compatibility to not break current behavior and added a warn message for the user.

@nedtwigg nedtwigg merged commit faa8927 into diffplug:master Feb 5, 2018
Project project = ProjectBuilder.builder().build();
ExtraPropertiesExtension props = project.getExtensions().getExtraProperties();

props.set("GOOMPH_PDE_VER", "1.0.0");
Copy link
Contributor

@ralfgrossklaus ralfgrossklaus Feb 28, 2018

Choose a reason for hiding this comment

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

This unit test fails on Mac because of the check in PdeInstallation constructor:

    java.lang.IllegalArgumentException: On mac, must be 4.5.0 (Mars) or later, because of folder layout problems.
        at com.diffplug.gradle.pde.PdeInstallation.<init>(PdeInstallation.java:122)
        at com.diffplug.gradle.pde.PdeInstallation.from(PdeInstallation.java:110)
        at com.diffplug.gradle.pde.PdeInstallation.fromProject(PdeInstallation.java:105)
        at com.diffplug.gradle.pde.PdeInstallationPropertiesTest.testUpdateSiteProperty(PdeInstallationPropertiesTest.java:39)

com.diffplug.gradle.pde.PdeInstallationPropertiesTest > testUpdateSitePropertyDownwardsCompatibilityDueTypo FAILED
    java.lang.IllegalArgumentException: On mac, must be 4.5.0 (Mars) or later, because of folder layout problems.
        at com.diffplug.gradle.pde.PdeInstallation.<init>(PdeInstallation.java:122)
        at com.diffplug.gradle.pde.PdeInstallation.from(PdeInstallation.java:110)
        at com.diffplug.gradle.pde.PdeInstallation.fromProject(PdeInstallation.java:105)
        at com.diffplug.gradle.pde.PdeInstallationPropertiesTest.testUpdateSitePropertyDownwardsCompatibilityDueTypo(PdeInstallationPropertiesTest.java:57)

Probably the check is wrong and the test is OK. I don't think it makes sense that GOOMPH_PDE_VER must match Eclipse version numbers?

Copy link
Member

Choose a reason for hiding this comment

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

The check is actually important. eclipse moved the locations of a lot of files around in eclipse 4.5.0 on mac. Supporting pre<4.5.0 on mac is basically supporting a fourth OS. Better to change 1.0.0 to 4.5.0 I think.

Also, the eclipse releases are looked-up manually in this: https://github.com/diffplug/goomph/blob/master/src/main/java/com/diffplug/gradle/pde/EclipseRelease.java

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