[equinox-dev] equinox state and resolver

2011-07-20 Thread Kapukaranov, Borislav
Hi,

I was playing around with the Equinox resolver and state and observed something 
that confused me.

I get a state object from PlatformAdmin and add some bundle descriptions that I 
know won't be able to resolve - for example they trigger a uses conflict.
I call resolve and after that isResolved(), which returns true.
If I go through the bundle descriptions in the state and check them I'll be 
able to retrieve the resolver error for the uses conflict and that particular 
bundle description will return false for its isResolved() method.
I found that strange so I checked the javadoc for State's isResolved method and 
found it Returns true if there have been no modifications to this state since 
the last time resolve() was called..
This puzzled me even more, after all I included some descriptions in that State.

In Virgo for the quasi resolve to catch resolver errors early, we check the 
bundles descriptions for resolver errors and don't call the isResolved method 
of the State, which works fine.
But it made me curious about how the State is expected to work and in order to 
get a resolution result which is the best approach.
Can you share some technical background? :)

Best Regards
Borislav

___
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev


Re: [equinox-dev] equinox state and resolver

2011-07-20 Thread Thomas Watson
The isResolved() method does not indicate that every bundle in the state is
in the resolved state.  As the javadoc states it only indicates that the
State has not been modified since the last call to one of the State.resolve
methods.  This method is intended to indicate that the State needs a
resolve operation done on it because it has pending changes that could
effect the resolution state when one of the resolve methods is called.

Perhaps I should add that last sentence to the javadoc ;-)

It sounds like Virgo is doing the correct thing by looking for resolver
errors for unresolved BundleDescriptions after performing a resolve
operation.

HTH

Tom




|
| From:  |
|
  
--|
  |Kapukaranov, Borislav borislav.kapukara...@sap.com   
 |
  
--|
|
| To:|
|
  
--|
  |Equinox development mailing list equinox-dev@eclipse.org   
 |
  
--|
|
| Date:  |
|
  
--|
  |07/20/2011 06:08 AM  
 |
  
--|
|
| Subject:   |
|
  
--|
  |[equinox-dev] equinox state and resolver 
 |
  
--|





Hi,

I was playing around with the Equinox resolver and state and observed
something that confused me.

I get a state object from PlatformAdmin and add some bundle descriptions
that I know won’t be able to resolve – for example they trigger a “uses”
conflict.
I call resolve and after that isResolved(), which returns true.
If I go through the bundle descriptions in the state and check them I’ll be
able to retrieve the resolver error for the uses conflict and that
particular bundle description will return false for its isResolved()
method.
I found that strange so I checked the javadoc for State’s isResolved method
and found it “Returns true if there have been no modifications to this
state since the last time resolve() was called.”.
This puzzled me even more, after all I included some descriptions in that
State.

In Virgo for the quasi resolve to catch resolver errors early, we check the
bundles descriptions for resolver errors and don’t call the isResolved
method of the State, which works fine.
But it made me curious about how the State is expected to work and in order
to get a resolution result which is the best approach.
Can you share some technical background? :)

Best Regards
Borislav
 ___
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

inline: graycol.gifinline: ecblank.gif___
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev


Re: [equinox-dev] equinox state and resolver

2011-07-20 Thread Kapukaranov, Borislav
Thanks for the clarification :)
So there isn’t a way to get only the bundle descriptions that has a resolver 
error. You have to check them all.

Best Regards
Borislav

From: equinox-dev-boun...@eclipse.org [mailto:equinox-dev-boun...@eclipse.org] 
On Behalf Of Thomas Watson
Sent: Wednesday, July 20, 2011 3:51 PM
To: Equinox development mailing list
Subject: Re: [equinox-dev] equinox state and resolver


The isResolved() method does not indicate that every bundle in the state is in 
the resolved state. As the javadoc states it only indicates that the State has 
not been modified since the last call to one of the State.resolve methods. This 
method is intended to indicate that the State needs a resolve operation done on 
it because it has pending changes that could effect the resolution state when 
one of the resolve methods is called.

Perhaps I should add that last sentence to the javadoc ;-)

It sounds like Virgo is doing the correct thing by looking for resolver errors 
for unresolved BundleDescriptions after performing a resolve operation.

HTH

Tom



[cid:image001.gif@01CC470A.C01A0EC0]Kapukaranov, Borislav ---07/20/2011 
06:08:39 AM---Hi,

From:


Kapukaranov, Borislav borislav.kapukara...@sap.com


To:


Equinox development mailing list equinox-dev@eclipse.org


Date:


07/20/2011 06:08 AM


Subject:


[equinox-dev] equinox state and resolver





Hi,

I was playing around with the Equinox resolver and state and observed something 
that confused me.

I get a state object from PlatformAdmin and add some bundle descriptions that I 
know won’t be able to resolve – for example they trigger a “uses” conflict.
I call resolve and after that isResolved(), which returns true.
If I go through the bundle descriptions in the state and check them I’ll be 
able to retrieve the resolver error for the uses conflict and that particular 
bundle description will return false for its isResolved() method.
I found that strange so I checked the javadoc for State’s isResolved method and 
found it “Returns true if there have been no modifications to this state since 
the last time resolve() was called.”.
This puzzled me even more, after all I included some descriptions in that State.

In Virgo for the quasi resolve to catch resolver errors early, we check the 
bundles descriptions for resolver errors and don’t call the isResolved method 
of the State, which works fine.
But it made me curious about how the State is expected to work and in order to 
get a resolution result which is the best approach.
Can you share some technical background? :)

Best Regards
Borislav
___
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

inline: image001.gifinline: image003.pnginline: image004.png___
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev


Re: [equinox-dev] equinox state and resolver

2011-07-20 Thread Thomas Watson
There is no helper method on State to get only the bundle descriptions with
resolver errors.  You should only have to get resolver errors for
descriptions that have BundleDescription.isResolved() return false.  Once
that return true will have not resolver errors.

Tom




|
| From:  |
|
  
--|
  |Kapukaranov, Borislav borislav.kapukara...@sap.com   
 |
  
--|
|
| To:|
|
  
--|
  |Equinox development mailing list equinox-dev@eclipse.org   
 |
  
--|
|
| Date:  |
|
  
--|
  |07/20/2011 10:33 AM  
 |
  
--|
|
| Subject:   |
|
  
--|
  |Re: [equinox-dev] equinox state and resolver 
 |
  
--|





Thanks for the clarification :)
So there isn’t a way to get only the bundle descriptions that has a
resolver error. You have to check them all.

Best Regards
Borislav

From: equinox-dev-boun...@eclipse.org [
mailto:equinox-dev-boun...@eclipse.org] On Behalf Of Thomas Watson
Sent: Wednesday, July 20, 2011 3:51 PM
To: Equinox development mailing list
Subject: Re: [equinox-dev] equinox state and resolver



The isResolved() method does not indicate that every bundle in the state is
in the resolved state. As the javadoc states it only indicates that the
State has not been modified since the last call to one of the State.resolve
methods. This method is intended to indicate that the State needs a resolve
operation done on it because it has pending changes that could effect the
resolution state when one of the resolve methods is called.

Perhaps I should add that last sentence to the javadoc ;-)

It sounds like Virgo is doing the correct thing by looking for resolver
errors for unresolved BundleDescriptions after performing a resolve
operation.

HTH

Tom



Inactive hide details for Kapukaranov, Borislav ---07/20/2011 06:08:39
AM---Hi,Kapukaranov, Borislav ---07/20/2011 06:08:39 AM---Hi,


   
   
 From: Kapukaranov, Borislav borislav.kapukara...@sap.com  
   
   
 To:   Equinox development mailing list
   equinox-dev@eclipse.org   
   
   
 Date: 07/20/2011 06:08 AM 
   
   
 Subject:  [equinox-dev] equinox state and resolver
   






Hi,

I was playing around with the Equinox resolver and state and observed
something that confused me.

I get a state object from PlatformAdmin and add some bundle descriptions
that I know won’t be able to resolve – for example they trigger a “uses”
conflict.
I call resolve and after that isResolved(), which returns true.
If I go through the bundle descriptions in the state and check them I’ll be
able to retrieve the resolver error for the uses conflict and that