Core icon indicating copy to clipboard operation
Core copied to clipboard

Specification module name

Open tcamin opened this issue 2 years ago • 1 comments

Can someone confirm that the implementation of Pod::Specification#module_name is the expected one for subspecs?

The current implementation is the following:

    def module_name
      attributes_hash['module_name'] ||
        c99ext_identifier(attributes_hash['header_dir']) ||
        c99ext_identifier(attributes_hash['name'])
    end

In the case of a subspec the module_name doesn't seem to be correct since it returns the name of the subspec. For example a specification of a pod PodName/SubspecName returns SubspecName as module_name whether I would expect it to be PodName.

Should this be rewritten as

    def module_name
      attributes_hash['module_name'] ||
        c99ext_identifier(attributes_hash['header_dir']) ||
        c99ext_identifier(Pod::Specification::root_name(name))
    end

?

tcamin avatar Jun 30 '22 15:06 tcamin

Mega

Sulxl avatar Mar 06 '23 01:03 Sulxl