CocoaPods/Core

Specification module name

Opened this issue · 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

?

Sulxl commented

Mega