Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » SettingIgnoring Worspace's API Base Line
SettingIgnoring Worspace's API Base Line [message #664121] Thu, 07 April 2011 14:33 Go to next message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
Hi Bucky Team,

Recently, I've tried to change my hudson job[1] to use buckminster 3.7. I got the following errors, which were warnings when using buckminster 3.6:

Error: file /opt/users/hudsonbuild/workspace/buckminster-mdt-ocl-core-3. 1-nightly/buildroot/buckminster.workspace/plugins/org.eclips e.ocl: An API baseline has not been set for the current workspace.

My questions are the following:
a) Is there any way via buckminster commands to change the workspace settings so that not setting API Base line for it is a warning rather than an error. If there were someone, could I have some guidances to do that ?

b) I have read some documentation concerning setting the API base line for buckminster's workspace [2]. I'm wondering if hudson server has any defined API base lines, so that I may simply add a "setpref" command to use said API base line. Otherwise, would I have to define a baseline ? May a p2 URL be used as the the API Base Line ?

[1] https://hudson.eclipse.org/hudson/job/buckminster-mdt-ocl-co re-3.1-nightly/
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=312021
Re: SettingIgnoring Worspace's API Base Line [message #664158 is a reply to message #664121] Thu, 07 April 2011 15:59 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Hi Adolfo,

On 2011-04-07 16:33, Adolfo Sánchez-Barbudo Herrera wrote:
> Hi Bucky Team,
>
> Recently, I've tried to change my hudson job[1] to use buckminster 3.7. I got the following errors, which were warnings
> when using buckminster 3.6:
>
> Error: file /opt/users/hudsonbuild/workspace/buckminster-mdt-ocl-core-3.
> 1-nightly/buildroot/buckminster.workspace/plugins/org.eclips e.ocl: An API baseline has not been set for the current
> workspace.
>
> My questions are the following:
> a) Is there any way via buckminster commands to change the workspace settings so that not setting API Base line for it
> is a warning rather than an error. If there were someone, could I have some guidances to do that ?
>
If it is possible to control this via a project specific setting, then I would recommend that you do that and check it
in. If not, then what you need is a template workspace. There is large amount of settings that affect your builds in
various ways and the Eclipse IDE provides convenient preference pages for them. The mechanics are simple:

1. Start your IDE on a non-existent workspace.
2. Set all settings that you want in your build.
3. Exit your IDE.
4. Create a zip of the workspace. This is now the template.
5. Unzip the template to the location that you later refer to with -data as the first step in your headless build.

Buckminster will now build your workspace with the settings from #2.

> b) I have read some documentation concerning setting the API base line for buckminster's workspace [2]. I'm wondering if
> hudson server has any defined API base lines, so that I may simply add a "setpref" command to use said API base line.
> Otherwise, would I have to define a baseline ? May a p2 URL be used as the the API Base Line ?
>
A baseline has to be a target definition so that's something that you'll need to prepare in advance. IIRC, Johannes
Utzig made some experimental support for this in the Hudson Buckminster plug-in but I'm not sure what the status is on that.

- thomas
Re: SettingIgnoring Worspace's API Base Line [message #664334 is a reply to message #664158] Fri, 08 April 2011 12:11 Go to previous messageGo to next message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
> If it is possible to control this via a project specific setting, then I would recommend that you do that and check it
in.

This is not a project specific, but a workspace one.

>If not, then what you need is a template workspace. There is large amount of settings that affect your builds in
various ways and the Eclipse IDE provides convenient preference pages for them. The mechanics are simple:

1. Start your IDE on a non-existent workspace.
2. Set all settings that you want in your build.
3. Exit your IDE.
4. Create a zip of the workspace. This is now the template.
5. Unzip the template to the location that you later refer to with -data as the first step in your headless build.

Well, I could try this. However, I've noticed that EMF job is using Buckminster 3.7 and it doesn't seem the build needs this extra effort. Would you mind point Mickal to this thread to obtain his feedback ?

>A baseline has to be a target definition so that's something that you'll need to prepare in advance. IIRC, Johannes Utzig made some experimental support for this in the Hudson Buckminster plug-in but I'm not sure what the status is on that.

I'll try to define a suitable target definition with P2 repositories URLs to include in my releng stuff.... Let's see what happens
Re: SettingIgnoring Worspace's API Base Line [message #664342 is a reply to message #664334] Fri, 08 April 2011 12:17 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
On 2011-04-08 14:11, Adolfo Sánchez-Barbudo Herrera wrote:

> Well, I could try this. However, I've noticed that EMF job is using Buckminster 3.7 and it doesn't seem the build needs
> this extra effort. Would you mind point Mickal to this thread to obtain his feedback ?
>
I can see two reasons for that. Either they use the project specific settings that I proposed, or they didn't have the
warnings at all when they used 3.6.

- thomas
Re: SettingIgnoring Worspace's API Base Line [message #664381 is a reply to message #664342] Fri, 08 April 2011 15:07 Go to previous messageGo to next message
Michal Ruzicka is currently offline Michal RuzickaFriend
Messages: 23
Registered: July 2009
Junior Member
Hi All,
comments bellow.
Dne 8.4.2011 14:17, Thomas Hallgren napsal(a):
> On 2011-04-08 14:11, Adolfo Sánchez-Barbudo Herrera wrote:
>
>> Well, I could try this. However, I've noticed that EMF job is using
>> Buckminster 3.7 and it doesn't seem the build needs
>> this extra effort. Would you mind point Mickal to this thread to
>> obtain his feedback ?
>>
> I can see two reasons for that. Either they use the project specific
> settings that I proposed, or they didn't have the warnings at all when
> they used 3.6.
It is as Thomas have guessed: we didn't get the warnings with the 3.6
based buckminster so we don't have the problem with the 3.7 based one.

On the workspace level settings and workspace template front: I'm not a
huge fan of the workspace template idea, as it is not very flexible when
you are in a need to make a particular workspace level setting a
changeable parameter of a headless build. So the preferred solution IMO
would be to add the support for changing the setting to Buckminster.
This can prove to be very easy to do (as was the case of SSH preferences
- see [1] and [2]). So if you could find out how to change that setting
programmatically and provide a patch for that, I'd be happy to review
and apply it.

Cheers,
Michal

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=310204
[2]
http://dev.eclipse.org/viewcvs/viewvc.cgi?view=revision& root=TOOLS_BUCKMINSTER&revision=11445
Re: SettingIgnoring Worspace's API Base Line [message #664391 is a reply to message #664381] Fri, 08 April 2011 15:50 Go to previous messageGo to next message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
Mid-air collision.

Michal, Thomas thanks, I'll look into the better way to deal with this.

Best Regards,
Adolfo.
----------

>I can see two reasons for that. Either they use the project specific settings that I proposed, or they didn't have the
warnings at all when they used 3.6.

1. As said, there is not project specific settings for this. I mean, setting the API baseline for the workspace, and having a warning or error for not setting it up, is an exclusive workspace setting.

2. I also believe that the didn't have those warning when they used 3.6. Now, the question is why my build has those warnings (Bucky3.6) / errors (Bucky 3.7) and the EMF one doesn't have any, providing we are both using the same Hudson/Buckminster stuff

Perhaps, having any other API Analysys setting could cause this ?. For intance, I can see that the project org.eclipse.ocl has
- an org.eclipse.pde.api.tools.apiAnalysisNature nature.
- an org.eclipse.pde.api.tools.apiAnalysisBuilder builder.

In the case this was the cause, we can't obviously remove this, since this is a requirement for our projects to ensure that developers are doing well with APIs.

Could you please ask Michal if he has done anything setting concerning API Analysy Tooling .

Thanks in advance,
Adolfo.
Re: SettingIgnoring Worspace's API Base Line [message #664402 is a reply to message #664391] Fri, 08 April 2011 16:19 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Adolfo, Michal, please add enhancement requests to our bugzilla for any additional setting that you think is
appropriate. The API support is relatively new and your experience in this area is important.

Thanks,
Thomas Hallgren


On 2011-04-08 17:50, Adolfo Sánchez-Barbudo Herrera wrote:
> Mid-air collision.
>
> Michal, Thomas thanks, I'll look into the better way to deal with this.
>
> Best Regards,
> Adolfo.
> ----------
>
>> I can see two reasons for that. Either they use the project specific settings that I proposed, or they didn't have the
> warnings at all when they used 3.6.
>
> 1. As said, there is not project specific settings for this. I mean, setting the API baseline for the workspace, and
> having a warning or error for not setting it up, is an exclusive workspace setting.
>
> 2. I also believe that the didn't have those warning when they used 3.6. Now, the question is why my build has those
> warnings (Bucky3.6) / errors (Bucky 3.7) and the EMF one doesn't have any, providing we are both using the same
> Hudson/Buckminster stuff
>
> Perhaps, having any other API Analysys setting could cause this ?. For intance, I can see that the project
> org.eclipse.ocl has
> - an org.eclipse.pde.api.tools.apiAnalysisNature nature.
> - an org.eclipse.pde.api.tools.apiAnalysisBuilder builder.
>
> In the case this was the cause, we can't obviously remove this, since this is a requirement for our projects to ensure
> that developers are doing well with APIs.
>
> Could you please ask Michal if he has done anything setting concerning API Analysy Tooling .
>
> Thanks in advance,
> Adolfo.
Re: SettingIgnoring Worspace's API Base Line [message #664988 is a reply to message #664402] Tue, 12 April 2011 17:26 Go to previous messageGo to next message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
Thommas, Michal,

When reading some bugzillas[1] I've found that using the importprefs command could be an alternative way to tune up this setting (among others) when running my job. Michal, could you expand the information in said bugzilla in which you say that this mechanism is not flexible ?.

On the other hand, I've tried to fix the problem by the means of setting up the API Base Line. I've finally got it [2] using the following commands

# We import a target definition which will be our API Base Line
importtargetdefinition " ${checkout.location}/org.eclipse.mdt/org.eclipse.ocl/releng/ org.eclipse.ocl.releng.buckminster/APIBaseLine.target "
addbaseline -A "MDT/OCL API Base Line"

However, I have a couple of inconveniences/issues/questions:
1. There are a lot of [Fatal Error] :1:1: Premature end of file.

However, this doesn't prevent the build success. Besides, I read in a different forum's thread[3] that this would be fixed in the next milestone.

2. There a lot of ERROR: Error logged from API Tools Core:
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:883)
at org.eclipse.pde.api.tools.internal.ApiBaselineManager.persis tStateCache(ApiBaselineManager.java:339)

However, this doesn't prevent the build sucess. Any idea what about this issue ?.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=310204
[2] https://hudson.eclipse.org/hudson/job/buckminster-mdt-ocl-co re-3.1-nightly/425/
[3] http://www.eclipse.org/forums/index.php?t=msg&goto=66349 9

Cheers,
Adolfo.
Re: SettingIgnoring Worspace's API Base Line [message #664992 is a reply to message #664988] Tue, 12 April 2011 17:44 Go to previous messageGo to next message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
BTW,

I've run our job[1] in Eclipse Hudon using "Buckminster 3.7 Integration".

1. Indeed, the [Fatal Error] :1:1: Premature end of file. disappear.

2. The IOException concerning API tooling, still remains.

3. The worst is that the build fails with the following error:

INFO: [start org.eclipse.ocl.doc:osgi.bundle$3.1.0.qualifier#buckminster. prebind]
ERROR: org.eclipse.core.runtime.CoreException: /opt/users/hudsonbuild/workspace/buckminster-mdt-ocl-core-3. 1-nightly/buildroot/buckminster.workspace/plugins/org.eclips e.ocl.doc/build.xml:58: The following error occurred while executing this line:
/opt/users/hudsonbuild/workspace/buckminster-mdt-ocl-core-3. 1-nightly/buildroot/buckminster.workspace/plugins/org.eclips e.ocl.doc/build.xml:77: The following error occurred while executing this line:
/opt/users/hudsonbuild/workspace/buckminster-mdt-ocl-core-3. 1-nightly/buildroot/buckminster.workspace/plugins/org.eclips e.ocl.doc/build.xml:81: Problem: failed to create task or type help.buildHelpIndex
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

This looks like a regression issue, doesn't it ?

[1] https://hudson.eclipse.org/hudson/job/buckminster-mdt-ocl-co re-3.1-nightly/427/

P.S: I'm assuming that "Buckminster 3.7 Integration" is newer than "Buckminster 3.7". Correct me if I'm wrong Razz

Cheers,
Adolfo.
Re: SettingIgnoring Worspace's API Base Line [message #665000 is a reply to message #664992] Tue, 12 April 2011 18:21 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
The "Buckminster 3.7 Integration" is actually a copy of "Buckminster 3.6
Integration" right now, so please don't use that. Use "Buckminster 3.7".
It contains the latest bits.

- thomas

On 2011-04-12 19:44, Adolfo Sánchez-Barbudo Herrera wrote:
> BTW,
>
> I've run our job[1] in Eclipse Hudon using "Buckminster 3.7 Integration".
>
> 1. Indeed, the [Fatal Error] :1:1: Premature end of file. disappear.
>
> 2. The IOException concerning API tooling, still remains.
>
> 3. The worst is that the build fails with the following error:
>
> INFO: [start
> org.eclipse.ocl.doc:osgi.bundle$3.1.0.qualifier#buckminster. prebind]
> ERROR: org.eclipse.core.runtime.CoreException:
> /opt/users/hudsonbuild/workspace/buckminster-mdt-ocl-core-3.
> 1-nightly/buildroot/buckminster.workspace/plugins/org.eclips
> e.ocl.doc/build.xml:58: The following error occurred while executing
> this line:
> /opt/users/hudsonbuild/workspace/buckminster-mdt-ocl-core-3.
> 1-nightly/buildroot/buckminster.workspace/plugins/org.eclips
> e.ocl.doc/build.xml:77: The following error occurred while executing
> this line:
> /opt/users/hudsonbuild/workspace/buckminster-mdt-ocl-core-3.
> 1-nightly/buildroot/buckminster.workspace/plugins/org.eclips
> e.ocl.doc/build.xml:81: Problem: failed to create task or type
> help.buildHelpIndex
> Cause: The name is undefined.
> Action: Check the spelling.
> Action: Check that any custom tasks/types have been declared.
> Action: Check that any <presetdef>/<macrodef> declarations have taken
> place.
>
> This looks like a regression issue, doesn't it ?
>
> [1]
> https://hudson.eclipse.org/hudson/job/buckminster-mdt-ocl-co re-3.1-nightly/427/
>
>
> P.S: I'm assuming that "Buckminster 3.7 Integration" is newer than
> "Buckminster 3.7". Correct me if I'm wrong :p
>
> Cheers,
> Adolfo.
Re: SettingIgnoring Worspace's API Base Line [message #665010 is a reply to message #664988] Tue, 12 April 2011 18:29 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
On 2011-04-12 19:26, Adolfo Sánchez-Barbudo Herrera wrote:
> However, I have a couple of inconveniences/issues/questions:
> 1. There are a lot of [Fatal Error] :1:1: Premature end of file.
>
This is a known bug in p2 3.7M6. It causes no harm other than the ugly
printout and is already fixed in an integration build.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=341508

> However, this doesn't prevent the build success. Besides, I read in a
> different forum's thread[3] that this would be fixed in the next milestone.
>
> 2. There a lot of ERROR: Error logged from API Tools Core:
> java.io.IOException: No such file or directory
> at java.io.UnixFileSystem.createFileExclusively(Native Method)
> at java.io.File.createNewFile(File.java:883)
> at org.eclipse.pde.api.tools.internal.ApiBaselineManager.persis
> tStateCache(ApiBaselineManager.java:339)
>
That might be worth reporting to the PDE team. I haven't seen that before.

- thomas
Re: SettingIgnoring Worspace's API Base Line [message #670359 is a reply to message #665010] Fri, 13 May 2011 16:17 Go to previous message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
Hello Thomas,

Taking this issue up

Quote:
On 2011-04-12 19:26, Adolfo Sánchez-Barbudo Herrera wrote:
> However, I have a couple of inconveniences/issues/questions:
> 1. There are a lot of [Fatal Error] :1:1: Premature end of file.
>
This is a known bug in p2 3.7M6. It causes no harm other than the ugly
printout and is already fixed in an integration build.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=341508


This is still happening in Eclipse Hudson's job. Would you mind telling Mickal to do an update of the buckminster 3.7 used by Eclipse Hudson?. Would you need a bugzilla for this ?

Quote:

> However, this doesn't prevent the build success. Besides, I read in a
> different forum's thread[3] that this would be fixed in the next milestone.
>
> 2. There a lot of ERROR: Error logged from API Tools Core:
> java.io.IOException: No such file or directory
> at java.io.UnixFileSystem.createFileExclusively(Native Method)
> at java.io.File.createNewFile(File.java:883)
> at org.eclipse.pde.api.tools.internal.ApiBaselineManager.persis
> tStateCache(ApiBaselineManager.java:339)
>
That might be worth reporting to the PDE team. I haven't seen that before.

- thomas


I've finally fixed this. The problem was that I was using a "path" rather than "uri" in the importtargetdefinitiion command in order to import the target platform which would be act as the API Base line in buckminster's workspace. So, in my job configuration I've replaced:

importtargetdefinition " ${checkout.location}/org.eclipse.mdt/org.eclipse.ocl/releng/ org.eclipse.ocl.releng.buckminster/APIBaseLine.target "
addbaseline -A "Eclipse OCL API Base Line"

By:

importtargetdefinition " file://${checkout.location}/org.eclipse.mdt/org.eclipse.ocl/ releng/org.eclipse.ocl.releng.buckminster/APIBaseLine.target"
addbaseline -A "Eclipse OCL API Base Line"

The API Tooling would probably treat path as workspace relative paths, so we would need to use a proper file URI to tell buckminster from where obtain the target platform definition.

I hope this help others.

Cheers,
Adolfo.
Previous Topic:Deliver no source files in p2 site
Next Topic:Best way to mirror a p2 respositry
Goto Forum:
  


Current Time: Fri Mar 29 13:13:08 GMT 2024

Powered by FUDForum. Page generated in 0.03404 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top