You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Ittay Dror (JIRA)" <ji...@apache.org> on 2008/11/03 15:19:44 UTC

[jira] Created: (BUILDR-197) ArchiveTask#needed? calls 'super'

ArchiveTask#needed? calls 'super' 
----------------------------------

                 Key: BUILDR-197
                 URL: https://issues.apache.org/jira/browse/BUILDR-197
             Project: Buildr
          Issue Type: Bug
          Components: Packaging
    Affects Versions: 1.3.2
            Reporter: Ittay Dror
             Fix For: 1.3.4


At the end of needed? If it found that no re-packaging is required, it still delegates to 'super'. 

The result is that if there is a Rake::Task prerequisite, with no prerequisites, it will return a Time.now timestamp which will return true from Rake::Task#needed?, which will trigger the package. The package will be the same as before, but its timestamp will change, causing triggering of dependent tasks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-197) ArchiveTask#needed? calls 'super'

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644758#action_12644758 ] 

Assaf Arkin commented on BUILDR-197:
------------------------------------

"FileTask is a generic task. It assumes that if prerequisites changed, it must mean the file needs to be regenerated"

That is the expected behavior. I don't see the problem in that.

> ArchiveTask#needed? calls 'super' 
> ----------------------------------
>
>                 Key: BUILDR-197
>                 URL: https://issues.apache.org/jira/browse/BUILDR-197
>             Project: Buildr
>          Issue Type: Bug
>          Components: Packaging
>    Affects Versions: 1.3.2
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> At the end of needed? If it found that no re-packaging is required, it still delegates to 'super'. 
> The result is that if there is a Rake::Task prerequisite, with no prerequisites, it will return a Time.now timestamp which will return true from Rake::Task#needed?, which will trigger the package. The package will be the same as before, but its timestamp will change, causing triggering of dependent tasks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-197) ArchiveTask#needed? calls 'super'

Posted by "Ittay Dror (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644747#action_12644747 ] 

Ittay Dror commented on BUILDR-197:
-----------------------------------

why call 'super'? even if Rake::Task#needed? returns true, what difference does it make? as far as i could see, the prerequisites are not used when creating the package. so calling Rake::Task#needed? achieves no functionality, but can cause the triggering of the task just because it has a Rake::Task prerequisite which was triggered. The ArchiveTask will be triggered, but since it only consults its @paths, it will produce the same jar as before (with the same content), but with a different timestamp, thus triggering other tasks.

> ArchiveTask#needed? calls 'super' 
> ----------------------------------
>
>                 Key: BUILDR-197
>                 URL: https://issues.apache.org/jira/browse/BUILDR-197
>             Project: Buildr
>          Issue Type: Bug
>          Components: Packaging
>    Affects Versions: 1.3.2
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> At the end of needed? If it found that no re-packaging is required, it still delegates to 'super'. 
> The result is that if there is a Rake::Task prerequisite, with no prerequisites, it will return a Time.now timestamp which will return true from Rake::Task#needed?, which will trigger the package. The package will be the same as before, but its timestamp will change, causing triggering of dependent tasks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (BUILDR-197) ArchiveTask#needed? calls 'super'

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Assaf Arkin resolved BUILDR-197.
--------------------------------

    Resolution: Invalid

ArchiveTask is a Rake::FileTask, check the rake.rb sources to see how its timestamp method behaves.

> ArchiveTask#needed? calls 'super' 
> ----------------------------------
>
>                 Key: BUILDR-197
>                 URL: https://issues.apache.org/jira/browse/BUILDR-197
>             Project: Buildr
>          Issue Type: Bug
>          Components: Packaging
>    Affects Versions: 1.3.2
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> At the end of needed? If it found that no re-packaging is required, it still delegates to 'super'. 
> The result is that if there is a Rake::Task prerequisite, with no prerequisites, it will return a Time.now timestamp which will return true from Rake::Task#needed?, which will trigger the package. The package will be the same as before, but its timestamp will change, causing triggering of dependent tasks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (BUILDR-197) ArchiveTask#needed? calls 'super'

Posted by "Ittay Dror (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ittay Dror closed BUILDR-197.
-----------------------------

    Resolution: Won't Fix

see assaf's comment

> ArchiveTask#needed? calls 'super' 
> ----------------------------------
>
>                 Key: BUILDR-197
>                 URL: https://issues.apache.org/jira/browse/BUILDR-197
>             Project: Buildr
>          Issue Type: Bug
>          Components: Packaging
>    Affects Versions: 1.3.2
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> At the end of needed? If it found that no re-packaging is required, it still delegates to 'super'. 
> The result is that if there is a Rake::Task prerequisite, with no prerequisites, it will return a Time.now timestamp which will return true from Rake::Task#needed?, which will trigger the package. The package will be the same as before, but its timestamp will change, causing triggering of dependent tasks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-197) ArchiveTask#needed? calls 'super'

Posted by "Ittay Dror (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644754#action_12644754 ] 

Ittay Dror commented on BUILDR-197:
-----------------------------------

FileTask is a generic task. It assumes that if prerequisites changed, it must mean the file needs to be regenerated (or that the execution code takes care not to do anything if not required). But ArchiveTask is written in such a way that it doesn't use any of its prerequisites.

> ArchiveTask#needed? calls 'super' 
> ----------------------------------
>
>                 Key: BUILDR-197
>                 URL: https://issues.apache.org/jira/browse/BUILDR-197
>             Project: Buildr
>          Issue Type: Bug
>          Components: Packaging
>    Affects Versions: 1.3.2
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> At the end of needed? If it found that no re-packaging is required, it still delegates to 'super'. 
> The result is that if there is a Rake::Task prerequisite, with no prerequisites, it will return a Time.now timestamp which will return true from Rake::Task#needed?, which will trigger the package. The package will be the same as before, but its timestamp will change, causing triggering of dependent tasks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (BUILDR-197) ArchiveTask#needed? calls 'super'

Posted by "Ittay Dror (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ittay Dror reopened BUILDR-197:
-------------------------------


it should not call super. 

For example, CompileTask#needed? doesn't call super

> ArchiveTask#needed? calls 'super' 
> ----------------------------------
>
>                 Key: BUILDR-197
>                 URL: https://issues.apache.org/jira/browse/BUILDR-197
>             Project: Buildr
>          Issue Type: Bug
>          Components: Packaging
>    Affects Versions: 1.3.2
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> At the end of needed? If it found that no re-packaging is required, it still delegates to 'super'. 
> The result is that if there is a Rake::Task prerequisite, with no prerequisites, it will return a Time.now timestamp which will return true from Rake::Task#needed?, which will trigger the package. The package will be the same as before, but its timestamp will change, causing triggering of dependent tasks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-197) ArchiveTask#needed? calls 'super'

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644752#action_12644752 ] 

Assaf Arkin commented on BUILDR-197:
------------------------------------

ArchiveTask is a specialized FileTask, so it provides the same behavior and guarantees as any other FileTask. By calling super we get that behavior without duplicating code.

> ArchiveTask#needed? calls 'super' 
> ----------------------------------
>
>                 Key: BUILDR-197
>                 URL: https://issues.apache.org/jira/browse/BUILDR-197
>             Project: Buildr
>          Issue Type: Bug
>          Components: Packaging
>    Affects Versions: 1.3.2
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> At the end of needed? If it found that no re-packaging is required, it still delegates to 'super'. 
> The result is that if there is a Rake::Task prerequisite, with no prerequisites, it will return a Time.now timestamp which will return true from Rake::Task#needed?, which will trigger the package. The package will be the same as before, but its timestamp will change, causing triggering of dependent tasks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-197) ArchiveTask#needed? calls 'super'

Posted by "Assaf Arkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644743#action_12644743 ] 

Assaf Arkin commented on BUILDR-197:
------------------------------------

ArchiveTask calls super and behaves exactly as specified. I don't understand why that is an issue?

> ArchiveTask#needed? calls 'super' 
> ----------------------------------
>
>                 Key: BUILDR-197
>                 URL: https://issues.apache.org/jira/browse/BUILDR-197
>             Project: Buildr
>          Issue Type: Bug
>          Components: Packaging
>    Affects Versions: 1.3.2
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> At the end of needed? If it found that no re-packaging is required, it still delegates to 'super'. 
> The result is that if there is a Rake::Task prerequisite, with no prerequisites, it will return a Time.now timestamp which will return true from Rake::Task#needed?, which will trigger the package. The package will be the same as before, but its timestamp will change, causing triggering of dependent tasks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.