Community
Participate
Working Groups
Related to bug 276000 We have a number of features in the release repos that are intended only to be installed into the target platform. In fact, if they are installed into the IDE they may kill the install (e.g., installing RAP is "a bad thing"). Given that we are very late in the release, I propose a hack to make the workflow better for the folks who, for whatever reason, try to install these features into the IDE. Currently they see some spurious message talking about "A.PDE.Target.Platform" requirement not being satisfied. This is confusing for folks. My suggestion is to, at a very high level, look for that specific string in the error messages about to be presented and morph the message into something more readable (e.g., "You are trying to install <something> into your IDE that is intended only for Target Platforms."). This is clearly not a robust solution but it will address the 90% usability problem without introducing any additional overhead or extensibility points.
ping, any joy here for 3.6? This is something that is biting more and more people and hopefully could be a small tweak.
This would relate to new feature work which at this point as been put to an end according to the rules of engagements.
Thanks for the clarification. This is a polish item. The functionality is there now but the user experience is less than optimal. I've attached the polish keyword to accurately reflect the nature of this bug report.
Tom has been hacking around in this area and has had some success...
Created attachment 165304 [details] suggestion for improved message Here is a patch that uses a specific message if someone has selected an IU with a requirement on A.PDE.Target.Platform. Here is the error message that gets used if RAP is selected: <message> Cannot complete the install because software was selected which is intended only for installation into a target platform for the Plug-in Development Environment (PDE). Rich Ajax Platform (RAP) Runtime SDK 1.3.0.20100201-1223 (org.eclipse.rap.runtime.sdk.feature.group 1.3.0.20100201-1223): If provisioning a target platform then try disabling the option 'Include required software' </message> I had to put the blurb "If provisioning a target platform then try disabling the option 'Include required software'" at the end because this message is also used by PDE for provisioning a target and will get displayed if you have the option 'include required software' enabled.
(In reply to comment #5) > <message> > Cannot complete the install because software was selected which is intended > only for installation into a target platform for the Plug-in Development > Environment (PDE). > Rich Ajax Platform (RAP) Runtime SDK 1.3.0.20100201-1223 > (org.eclipse.rap.runtime.sdk.feature.group 1.3.0.20100201-1223): If > provisioning a target platform then try disabling the option 'Include required > software' > </message> Can I suggest some wording/formatting changes? (note, I am not sure how much control we have over formatting...) <message> The following software cannot be installed because it is intended for use only in Plug-in Development Environment (PDE) target platforms. Please deselect these items and retry the operation. Rich Ajax Platform (RAP) Runtime SDK 1.3.0.20100201-1223 If provisioning a target platform then try disabling the option 'Include required software' </message> > I had to put the blurb "If provisioning a target platform then try disabling > the option 'Include required software'" at the end because this message is also > used by PDE for provisioning a target and will get displayed if you have the > option 'include required software' enabled. This seems off. PDE should be putting the required capability into the planner when it is calling to provision the target platform. If that is not happening then can you open a bug against PDE? If we can get some joy on that then the "If provisioning..." sentence at the end can be removed.
(In reply to comment #6) > This seems off. PDE should be putting the required capability into the planner > when it is calling to provision the target platform. If that is not happening > then can you open a bug against PDE? This seems to fall under bug 276000. > > If we can get some joy on that then the "If provisioning..." sentence at the > end can be removed. If we can get PDE to add the capability to the provisioned targets then would we be OK?
Created attachment 165499 [details] updated patch I opened a new PDE bug309863 to focus in on getting PDE to "do the right thing" for provisioning target platforms with a A.PDE.Target.Platform capability. (In reply to comment #6) > Can I suggest some wording/formatting changes? (note, I am not sure how much > control we have over formatting...) Of coarse you can, that is what I hoped for ;-) > > <message> > The following software cannot be installed because it is intended > for use only in Plug-in Development Environment (PDE) target platforms. > Please deselect these items and retry the operation. > Rich Ajax Platform (RAP) Runtime SDK 1.3.0.20100201-1223 > > If provisioning a target platform then try disabling the option 'Include > required > software' > </message> The attached patch uses the above wording and puts the blurb about 'included required software at the end in a separate IStatus instead of including it in the name of the software. > > > I had to put the blurb "If provisioning a target platform then try disabling > > the option 'Include required software'" at the end because this message is also > > used by PDE for provisioning a target and will get displayed if you have the > > option 'include required software' enabled. > > This seems off. PDE should be putting the required capability into the planner > when it is calling to provision the target platform. If that is not happening > then can you open a bug against PDE? > > If we can get some joy on that then the "If provisioning..." sentence at the > end can be removed. bug309863 has been opened against PDE. I left the sentence in there for now but it can easily be removed if the PDE bug is fixed. Notice that I have found the latest code in head for the director seems to behave badly if trying to install RAP into the IDE. See bug306279
Created attachment 165635 [details] an alternative proposal, closer to the explanation architecture Here is another proposal that is cleaner IMHO. I could not try it because I do not have test cases. Thomas, it will give you the direction to customize the explanation messages for specific cases like this. I did not know where to put your second message: I only included the first one.
(In reply to comment #9) > Created an attachment (id=165635) [details] > an alternative proposal, closer to the explanation architecture > > Here is another proposal that is cleaner IMHO. > > I could not try it because I do not have test cases. > > Thomas, it will give you the direction to customize the explanation messages > for specific cases like this. > Thanks Daniel. Putting this down lower in the Explanation makes it difficult to have a clear message to the end user. With the latest patch we get a message like this when installing RAP into the IDE: <message> Cannot complete the install because some dependencies are not satisfiable Software being installed: Rich Ajax Platform (RAP) Runtime SDK 1.3.0.20100201-1223 (org.eclipse.rap.runtime.sdk.feature.group 1.3.0.20100201-1223) The following software Rich Ajax Platform (RAP) Runtime SDK 1.3.0.20100201-1223 (org.eclipse.rap.runtime.sdk.feature.group 1.3.0.20100201-1223) cannot be installed because it is intended for use only in Plug-in Development Environment (PDE) target platforms. Please deselect these items and retry the operation. </message> The first two parts of the message are not really that helpful to the end user. We want to avoid using terms like "some dependencies are not satisfiable" when attempts are made to install "target platform only" IUs. It is not that some dependencies were not satisfied (yes technically it is) but rather the user is simply trying to install something that is not valid to install. The last part of the message is helpful. This got generated by org.eclipse.equinox.internal.p2.director.Explanation.TargetPlatformProblem.toStatus(). But the issue here is that the problem is detected too low so we have no ability to gather up a list of all IUs that may have the same issue. So if you selected multiple IUs with the A.PDE.Target.Platform requirement then you would get a separate message for each on containing: "The following software ... cannot be installed because it is intended for use only in Plug-in Development Environment (PDE) target platforms. Please deselect these items and retry the operation." Ideally we would like to only have this message listed once followed by the list of problematic IUs. This is why I placed the logic in SimplePlanner.convertExplanationToStatus(Set<Explanation>). This seemed like to most simple place to gather up the explanations and provide a specific message for this case.
The explanation elements are sorted using the orderValue() method. Just change the current value (3) by something smaller (0 or even -1). That way, you will get first the explanation, and could decide to remove the remaining elements from the explanation. You can also define a new constant to detect easily what kind of explanation element you are meeting, instead of using an instead-of for instance.
The really great thing would be to automatically deselect those IUs, and just inform the user why they have been deselected :)
(In reply to comment #11) > The explanation elements are sorted using the orderValue() method. > > Just change the current value (3) by something smaller (0 or even -1). > > That way, you will get first the explanation, and could decide to remove the > remaining elements from the explanation. > > You can also define a new constant to detect easily what kind of explanation > element you are meeting, instead of using an instead-of for instance. Thanks Daniel, I will work on a patch using this approach. Before I do, can you confirm that I would remove any other elements from the explanation and possibly add other messages to the overall status in SimplePlanner.convertExplanationToStatus(Set<Explanation>) Or are you expecting the Projector to do that. It seems like the best place to do the conversion of the explanation set into a status is in convertExplanationToStatus.
(In reply to comment #12) > The really great thing would be to automatically deselect those IUs, and just > inform the user why they have been deselected :) true, but at this point we are not looking for a heroic effort ;-) A better message would for this situation is a good step in the right direction.
(In reply to comment #13) > Thanks Daniel, I will work on a patch using this approach. Before I do, can > you confirm that I would remove any other elements from the explanation and > possibly add other messages to the overall status in > > SimplePlanner.convertExplanationToStatus(Set<Explanation>) yes, exactly.
Daniel and I discussed this and I don't think chaning the solver is a good thing. The change needs to stay where it currently is.
(In reply to comment #16) > Daniel and I discussed this and I don't think chaning the solver is a good > thing. The change needs to stay where it currently is. Solver? both patches are in the director. My original patch was contained to SimplePlanner. Daniel's suggestion involved a change to the Explanation and SimplePlanner. Where exactly do you think the change needs to stay? Only in SimplePlanner like my original suggestion or somewhere else?
Keep your initial approach.
We decided that it was better to take care of specific cases in SimplePlanner, as in your original patch, than changing the Projector and Explanation classes (which is the direct link to the solver). That way, the projector can focus on providing an explanation, and the SimplePlanner can make sense of it. There is no shared responsibility as with my proposal.
Comment on attachment 165635 [details] an alternative proposal, closer to the explanation architecture OK, Then I suggest we release the last patch I attached. We can clean up the message if PDE fixes bug309863
Fine with me.
(In reply to comment #21) > Fine with me. To be clear, I don't have commit rights to p2 so someone else will have to do it for me ;-)
oups, sorry. Done!
This has been released. Why is this still open? Is there more work to be done? Btw, do we have a test case for this?
(In reply to comment #24) > This has been released. Why is this still open? Is there more work to be done? > Btw, do we have a test case for this? You can close, I will work on a testcase during the testpass. I had started one already.
Thx for the patch Tom.
While working on a testcase I found a behavior that I am not sure of. If I am trying to install multiple IUs that have a requirement on A.PDE.Target.Platform namespace then I only see one of the IUs in the explanation set as failing. Should I expect to see both IUs or does the director only pick a single IU to include in the explanation set? I have verified that installing RAP into the IDE gives the expected behavior.
You get a minimal explanation, i.e. one of the reason why the request could not be fulfilled. In the specific case of missing requirements, we could maybe arrange something to get all of them at once.
(In reply to comment #28) > In the specific case of missing requirements, we could maybe arrange something > to get all of them at once. I would only be for something like that if it was generally useful, correct and relatively easy to do. I don't want to add any more hackery just for this specific case.