-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve target-dir restriction for detecting new android project… #576
Conversation
…cture used in plugin.xml. (apache#575)
Thanks @Jule- for the contribution. I think you are right that we need to handle the case where While reviewing the code related to this contribution I discovered another fix needed, raised in PR #577. I think we should consider throwing an exception, emitting an error, and aborting the P.S. I just raised #578 to report error handling that may be needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Questions need to be resolved before we merge this one. I am entering this as a formal review to avoid a premature merge.
Indeed you've found same issues as me... Sorry for the delay and parallel answer... |
@Jule- I am not sure what you mean here. As I said in #578 (comment): if you want to propose and discuss more changes to the In general I would like to keep the number of "old fashioned" directory path transformations to a minimum, no more than required to avoid breaking old plugins for a while. "Old fashioned" plugins would generally have target-dir starting with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe some rewrites too for this PR.
@brodybits tell me what do you think about this in order to patch the 7.1.x branch and then I could make a new PR for the master branche. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple things still needed:
- Test cases that demonstrate the cases that are resolved by these changes (I think they will be rare corner cases)
- Please rebase on
master
branch. We generally make fixes onmaster
branch first then cherry-pick if we need to make a patch release. - More succinct title
Some general comments:
I have some mixed feelings about this proposal.
First I would like to say that I am happy with the proposed changes in general. The proposed changes seem to improve the quality of the code and fix a couple corner cases.
My one doubt is that the need for these changes is still not super clear to me. Reviewing and testing these changes would divert some resources away from a number of much more important tasks that need our attention right now. This is especially true now that we want to deprecate and remove the old directory path support in #580, as I already said in #576 (comment).
So the benefit I see at this point is that the cleaner code would help us in case we encounter any more deprecated target directory issues in the future. I don't expect much more of an issue at this point but we never know.
I am also not convinced we should include this proposal on 7.1.x, unless we find another issue that affects existing plugins in the wild.
I would also like to get a review from one more member before merging. You may want to request another review from dev@cordova.apache.org, would suggest you solve these issues first and make a stronger case for this proposal.
It is blocking for me and I think for everyone who will try to get last |
That should have been fixed with 7.1.4 which was released quickly after this bug was discovered. |
…structure used in plugin.xml. (#575)
What does this PR do?
It just checks that
source-file
target-dir
starts withapp/
more thanapp
in order to detect the new android project structure usage inplugin.xml
.All explanations in #575.