You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by jaikiran <gi...@git.apache.org> on 2017/06/02 12:31:34 UTC

[GitHub] ant-ivy pull request #38: IVY-1475 Throw an explicit BuildException if cache...

GitHub user jaikiran opened a pull request:

    https://github.com/apache/ant-ivy/pull/38

    IVY-1475 Throw an explicit BuildException if cachefileset cannot determine a common base directory

    The commit here enhances the implementation of `cachefileset` task to throw an explicit `BuildException` in cases where it cannot determine a common base directory for the `fileset` it is trying to create. Furthermore, the documentation of this task has been updated to add details about the limitation of this task and also  a pointer to an alternate task that can be used in certain cases.
    
    This issue was raised in JIRA https://issues.apache.org/jira/browse/IVY-1475 and discussed in the ant-dev mailing list https://www.mail-archive.com/dev@ant.apache.org/msg45656.html

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jaikiran/ant-ivy ivy-1475

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ant-ivy/pull/38.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #38
    
----
commit 6c547b1c6321f89edfae433af343bf38f9dbfe43
Author: Jaikiran Pai <ja...@gmail.com>
Date:   2017-06-02T11:27:36Z

    IVY-1475 Throw an error if a common base directory cannot be determined for cachefileset task

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


[GitHub] ant-ivy issue #38: IVY-1475 Throw an explicit BuildException if cachefileset...

Posted by janmaterne <gi...@git.apache.org>.
Github user janmaterne commented on the issue:

    https://github.com/apache/ant-ivy/pull/38
  
    All fine with me. Maybe we could extract the method into FileUtil later. 
    I'll merge.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


[GitHub] ant-ivy issue #38: IVY-1475 Throw an explicit BuildException if cachefileset...

Posted by jaikiran <gi...@git.apache.org>.
Github user jaikiran commented on the issue:

    https://github.com/apache/ant-ivy/pull/38
  
    >> Maybe we could extract the method into FileUtil later.
    
    I went ahead and moved it to `FileUtil` since it does make sense for it to be there.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


[GitHub] ant-ivy issue #38: IVY-1475 Throw an explicit BuildException if cachefileset...

Posted by jaikiran <gi...@git.apache.org>.
Github user jaikiran commented on the issue:

    https://github.com/apache/ant-ivy/pull/38
  
    Closing this PR, because looking at the commits in master branch, it looks like Jan already pulled in this commit. Thanks @janmaterne 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


[GitHub] ant-ivy issue #38: IVY-1475 Throw an explicit BuildException if cachefileset...

Posted by jaikiran <gi...@git.apache.org>.
Github user jaikiran commented on the issue:

    https://github.com/apache/ant-ivy/pull/38
  
    >> requireCommonBaseDir:
    >>    could we replace firstPath by base==null?
    >>   line 115: additional comment:
    >>    'fail fast: ...'
    >>    line 117: 'finally we got ...'
    
    Done and PR updated
    
    >> getBaseDir:
    >>
    >>    Rename parameter to file1 and file2. For me it seems that both parameters are indepent from each other. 'base' implies that it's itself a parent of the other.
    
    You are right about that. So I changed the param names and updated the javadoc too. Please have a look in the updated PR and let me know if it makes sense now.
    
    >> you changed the semantic of the method:
    >> base==null && file==null --> old=NPE, new=null (ok with me ;)
    >> base==null && file!=null --> old=file.paren, new=null (incompatible change)
    >> base!=null && file==null --> both=null
    >> base!=null && file!=null --> both=commonBase
    >> could be static, maybe moved to a FileUtil-class
    
    When I started implementing the changes for this bug fix, I had a look at this method and its references. In reality, this `getBaseDir` essentially can/should be a private method. The only reason why it's package private right now is to have access to this method in a test case. There are no other references to this and given that this is a package private method, there's no other way this method can be by any other (external) code then that specific package. Given this background, I decided to intentionally make that incompatible semantic change so that it now fits in with the expectations of how we want it to behave. Do you think that should be good enough reason to go ahead with this change in semantics of this method?
    
    
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


[GitHub] ant-ivy issue #38: IVY-1475 Throw an explicit BuildException if cachefileset...

Posted by janmaterne <gi...@git.apache.org>.
Github user janmaterne commented on the issue:

    https://github.com/apache/ant-ivy/pull/38
  
    requireCommonBaseDir: 
    - could we replace firstPath by base==null?
    - line 115: additional comment:
      'fail fast: ...'
    - line 117: 'finally we got ...'
    
    getBaseDir:
    - Rename parameter to file1 and file2. For me it seems that both parameters are indepent from each other. 'base' implies that it's itself a parent of the other.
    - you changed the semantic of the method:
      base==null && file==null --> old=NPE, new=null  (ok with me ;)
      base==null && file!=null --> old=file.paren, new=null (incompatible change)
      base!=null && file==null --> both=null
      base!=null && file!=null --> both=commonBase
    - could be static, maybe moved to a FileUtil-class


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


[GitHub] ant-ivy pull request #38: IVY-1475 Throw an explicit BuildException if cache...

Posted by jaikiran <gi...@git.apache.org>.
Github user jaikiran closed the pull request at:

    https://github.com/apache/ant-ivy/pull/38


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org