You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Lacton (JIRA)" <ji...@apache.org> on 2008/07/25 02:35:31 UTC

[jira] Created: (BUILDR-106) download(artifact(...)=>url) broken

download(artifact(...)=>url) broken
-----------------------------------

                 Key: BUILDR-106
                 URL: https://issues.apache.org/jira/browse/BUILDR-106
             Project: Buildr
          Issue Type: Bug
          Components: Dependency management
         Environment: buildr trunk (rev 679619)
            Reporter: Lacton


The download method that can be used to override the download URL for artifacts is broken since revision 663405 of the trunk.

Error message: undefined method `to_sym' for #<Buildr::Artifact:0xb74745ac>

My analysis of the problem is as follows.
The 'download' method in common.rb calls the 'file' method (e.g., "file(args.keys.first)").
The 'file' method in project.rb calls the path_to method (e.g., "Rake::FileTask.define_task(path_to(task_name))").
The 'path_to' method in project.rb calls the 'layout.expand' method (e.g., "File.expand_path(layout.expand(*names), base_dir)").
The 'expand' method in project.rb calls the 'to_sym' methods of its arguments, even though *args can be a one-element array containing a Buildr::Artifact instance that does not understand the 'to_sym' call (e.g., "args.compact.reject { |s| s.to_s.empty? }.map(&:to_sym)").

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


[jira] Updated: (BUILDR-106) download(artifact(...)=>url) broken

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

Lacton updated BUILDR-106:
--------------------------

    Attachment: BUILDR-106.lib_patch.from_rev_679619

The one-line change that fixes the issue. :-)

> download(artifact(...)=>url) broken
> -----------------------------------
>
>                 Key: BUILDR-106
>                 URL: https://issues.apache.org/jira/browse/BUILDR-106
>             Project: Buildr
>          Issue Type: Bug
>          Components: Dependency management
>         Environment: buildr trunk (rev 679619)
>            Reporter: Lacton
>         Attachments: BUILDR-106.lib_patch.from_rev_679619, BUILDR-106.spec_patch.from_rev_679619
>
>
> The download method that can be used to override the download URL for artifacts is broken since revision 663405 of the trunk.
> Error message: undefined method `to_sym' for #<Buildr::Artifact:0xb74745ac>
> My analysis of the problem is as follows.
> The 'download' method in common.rb calls the 'file' method (e.g., "file(args.keys.first)").
> The 'file' method in project.rb calls the path_to method (e.g., "Rake::FileTask.define_task(path_to(task_name))").
> The 'path_to' method in project.rb calls the 'layout.expand' method (e.g., "File.expand_path(layout.expand(*names), base_dir)").
> The 'expand' method in project.rb calls the 'to_sym' methods of its arguments, even though *args can be a one-element array containing a Buildr::Artifact instance that does not understand the 'to_sym' call (e.g., "args.compact.reject { |s| s.to_s.empty? }.map(&:to_sym)").

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


[jira] Updated: (BUILDR-106) download(artifact(...)=>url) broken

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

Lacton updated BUILDR-106:
--------------------------

    Attachment: BUILDR-106.spec_patch.from_rev_679619

Patch for the specs.

1. I added a new spec to show the regression.

2. I added "define('foo')" to other surrounding specifications. Otherwise the "download" method is calling the wrong "file" method (i.e., the Rake module's file method instead of the Project class's file method).

> download(artifact(...)=>url) broken
> -----------------------------------
>
>                 Key: BUILDR-106
>                 URL: https://issues.apache.org/jira/browse/BUILDR-106
>             Project: Buildr
>          Issue Type: Bug
>          Components: Dependency management
>         Environment: buildr trunk (rev 679619)
>            Reporter: Lacton
>         Attachments: BUILDR-106.lib_patch.from_rev_679619, BUILDR-106.spec_patch.from_rev_679619
>
>
> The download method that can be used to override the download URL for artifacts is broken since revision 663405 of the trunk.
> Error message: undefined method `to_sym' for #<Buildr::Artifact:0xb74745ac>
> My analysis of the problem is as follows.
> The 'download' method in common.rb calls the 'file' method (e.g., "file(args.keys.first)").
> The 'file' method in project.rb calls the path_to method (e.g., "Rake::FileTask.define_task(path_to(task_name))").
> The 'path_to' method in project.rb calls the 'layout.expand' method (e.g., "File.expand_path(layout.expand(*names), base_dir)").
> The 'expand' method in project.rb calls the 'to_sym' methods of its arguments, even though *args can be a one-element array containing a Buildr::Artifact instance that does not understand the 'to_sym' call (e.g., "args.compact.reject { |s| s.to_s.empty? }.map(&:to_sym)").

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


[jira] Commented: (BUILDR-106) download(artifact(...)=>url) broken

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

Lacton commented on BUILDR-106:
-------------------------------

Great. Thank you for your quick response.

> download(artifact(...)=>url) broken
> -----------------------------------
>
>                 Key: BUILDR-106
>                 URL: https://issues.apache.org/jira/browse/BUILDR-106
>             Project: Buildr
>          Issue Type: Bug
>          Components: Dependency management
>         Environment: buildr trunk (rev 679619)
>            Reporter: Lacton
>             Fix For: 1.3.3
>
>         Attachments: BUILDR-106.lib_patch.from_rev_679619, BUILDR-106.spec_patch.from_rev_679619
>
>
> The download method that can be used to override the download URL for artifacts is broken since revision 663405 of the trunk.
> Error message: undefined method `to_sym' for #<Buildr::Artifact:0xb74745ac>
> My analysis of the problem is as follows.
> The 'download' method in common.rb calls the 'file' method (e.g., "file(args.keys.first)").
> The 'file' method in project.rb calls the path_to method (e.g., "Rake::FileTask.define_task(path_to(task_name))").
> The 'path_to' method in project.rb calls the 'layout.expand' method (e.g., "File.expand_path(layout.expand(*names), base_dir)").
> The 'expand' method in project.rb calls the 'to_sym' methods of its arguments, even though *args can be a one-element array containing a Buildr::Artifact instance that does not understand the 'to_sym' call (e.g., "args.compact.reject { |s| s.to_s.empty? }.map(&:to_sym)").

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


[jira] Resolved: (BUILDR-106) download(artifact(...)=>url) broken

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

Assaf Arkin resolved BUILDR-106.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.3

Thanks for including test cases!

Added to trunk/head.

> download(artifact(...)=>url) broken
> -----------------------------------
>
>                 Key: BUILDR-106
>                 URL: https://issues.apache.org/jira/browse/BUILDR-106
>             Project: Buildr
>          Issue Type: Bug
>          Components: Dependency management
>         Environment: buildr trunk (rev 679619)
>            Reporter: Lacton
>             Fix For: 1.3.3
>
>         Attachments: BUILDR-106.lib_patch.from_rev_679619, BUILDR-106.spec_patch.from_rev_679619
>
>
> The download method that can be used to override the download URL for artifacts is broken since revision 663405 of the trunk.
> Error message: undefined method `to_sym' for #<Buildr::Artifact:0xb74745ac>
> My analysis of the problem is as follows.
> The 'download' method in common.rb calls the 'file' method (e.g., "file(args.keys.first)").
> The 'file' method in project.rb calls the path_to method (e.g., "Rake::FileTask.define_task(path_to(task_name))").
> The 'path_to' method in project.rb calls the 'layout.expand' method (e.g., "File.expand_path(layout.expand(*names), base_dir)").
> The 'expand' method in project.rb calls the 'to_sym' methods of its arguments, even though *args can be a one-element array containing a Buildr::Artifact instance that does not understand the 'to_sym' call (e.g., "args.compact.reject { |s| s.to_s.empty? }.map(&:to_sym)").

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