Oomph triggers first Build before applying the correct compiler compliance level preference [message #1705948] |
Thu, 20 August 2015 11:02 |
Silvestre Martins Messages: 84 Registered: July 2009 |
Member |
|
|
I have an Oomph setup model in which I've recorded the java compiler compliance level, to 1.7:
<?xml version="1.0" encoding="UTF-8"?>
<setup:PreferenceTask
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
key="/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.compliance"
value="1.7"/>
However, the first build is full of compiler errors, and I think the reason is that it only applies this preference setting after the initial build has been started.
I've also set the 'Build workspace automatically' preference to false, but is still triggers the initial build, though I cannot find any task for this in the model.
If I then clean the workspace and trigger a new build, everything is fine.
Is there a place where I can force the preferences to be applied before the first build? Or the opposite, if I can set the first build to be last thing to be done?
[Updated on: Thu, 20 August 2015 11:03] Report message to a moderator
|
|
|
Re: Oomph trigger Build before applying the correct compiler compliance level preference [message #1705960 is a reply to message #1705948] |
Thu, 20 August 2015 12:35 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Silvestre,
Comments below.
On 20/08/2015 1:02 PM, Silvestre Martins wrote:
> I have an Oomph setup model in which I've recorded the java compiler
> compliance level, to 1.7:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <setup:PreferenceTask
> xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
> key="/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.compliance"
> value="1.7"/>
>
>
> However, the first build is full of compiler errors, and I think the
> reason is that it only applies this preference setting after the
> initial build has been started.
No, that should not be the case, the build runs after the tasks have
performed, so all preferences should be in their final state.
>
> I've also set the 'Build workspace automatically' preference to false,
> but is still triggers the initial build, though I cannot find any task
> for this in the model.
In
org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(IProgressMonitor)
we only trigger a build is auto build is enabled. But we test for that
initially, so if a preference task sets it to false while we've already
set it to false, we won't notice that.
>
> If I then clean the workspace and trigger a new build, everything is
> fine.
Of course we've never seen such a problem for the several dozen project
setups, so something else must be going on here...
>
> Is there a place where I can force the preferences to be applied
> before the first build?
The assumption that the preferences are set later is not correct.
> Or the opposite, if I can set the first build to be last thing to be
> done?
A build is definitely scheduled only after all tasks are performed.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03691 seconds