cfx docs fail if directory.lib is "."

RESOLVED INVALID

Status

P2
normal
RESOLVED INVALID
7 years ago
5 years ago

People

(Reporter: irakli, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

If in packages folder there is a package with non default lib folder.
That can be configured:

 1. by setting directories.lib to "." in package.json
 2. by specifying main outside of 'lib' folder in package.json

cfx docs fail with an error:

ne moment.
Traceback (most recent call last):
  File "/Users/gozala/Projects/addon-sdk/python-lib/cuddlefish/server.py", line 452, in <module>
    httpd, port = fault_tolerant_make_httpd(env_root)
  File "/Users/gozala/Projects/addon-sdk/python-lib/cuddlefish/server.py", line 264, in fault_tolerant_make_httpd
    httpd = make_httpd(env_root, host, port, quiet=True)
  File "/Users/gozala/Projects/addon-sdk/python-lib/cuddlefish/server.py", line 252, in make_httpd
    web_docs = webdocs.WebDocs(env_root, url)
  File "/Users/gozala/Projects/addon-sdk/python-lib/cuddlefish/webdocs.py", line 76, in __init__
    self.base_page = self._create_base_page(root, base_url)
  File "/Users/gozala/Projects/addon-sdk/python-lib/cuddlefish/webdocs.py", line 140, in _create_base_page
    self._create_package_summaries(self.packages_json, is_high_level)
  File "/Users/gozala/Projects/addon-sdk/python-lib/cuddlefish/webdocs.py", line 126, in _create_package_summaries
    text += self._create_module_list(package_json)
  File "/Users/gozala/Projects/addon-sdk/python-lib/cuddlefish/webdocs.py", line 104, in _create_module_list
    libs = package_json['files'][1]['lib'][1]
KeyError: 'lib'

It should pick up the right folder or in worst case ignore such package and print a warning specifying package path that can't be documented properly.
Notice that cfx docs fails in both cases listed above: when I discovered the bug and I talked with Irakli about it, he asked to me to add the directories.lib to package.json of the addon that broke the docs (jep4repl), but it doesn't solved the problem at all.
Oof, this sucks.  And it's definitely borderline.  But it doesn't feel quite bad enough to block.
OS: Mac OS X → All
Priority: -- → P1
Hardware: x86 → All
Target Milestone: --- → Future
Pushing to 1.3.
Priority: P1 → P2
Target Milestone: Future → 1.3
(Pushing all open bugs to the --- milestone for the new triage system)
Target Milestone: 1.3 → ---
nullified when bug 903032 landed.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.