eudoxia0 / docparser

Extract documentation from Common Lisp systems
41 stars 18 forks source link

docparser doesn't discover sub-packages in package-inferred systems #27

Open fisxoj opened 3 years ago

fisxoj commented 3 years ago

I'm looking at adding support to coo after someone opened a PR to add support for package inferred systems (https://github.com/fisxoj/coo/pull/24). It seems like, when asking docparser to parse such a system (rove, or jose from quicklisp for example) you end up with an empty index with no packages in it. It's not entirely surprising since the top-level system has no components and only requires it's component parts, but I wonder if there's something better to be done about it. I'm not super familiar with package-inferred systems, but since it has its own class, maybe it could be detected and the dependencies under depends-on could be loaded and parsed as packages in the system?

If I get into it enough, I might take a look, but here's something to maybe start a conversation about the best way to go about it.

Thanks

eudoxia0 commented 3 years ago

I don't know about package-inferred systems at all. I was always comfortable with ASDF and its explicit nature. I would welcome a PR that adds support for parsing package-inferred systems, but don't know how to implement that.

avodonosov commented 2 years ago

@fisxoj , what are your steps to reproduce?

I've just tried

(ql:quickload "rove")

and then M-x slime-inspect of the (docparser:parse "rove"). It is not empty:

#<(VECTOR T 16) #x302001D5510D>
--------------------
Dimensions: (16)
Element type: T
Total size: 16
Adjustable: T
Fill pointer: 15
Contents:
0: @2=#<DOCPARSER:PACKAGE-INDEX #x302001DF18FD>
1: @3=#<DOCPARSER:PACKAGE-INDEX #x302001E04BAD>
2: #<DOCPARSER:PACKAGE-INDEX #x302001E188AD>
3: #<DOCPARSER:PACKAGE-INDEX #x302001E3564D>
4: @4=#<DOCPARSER:PACKAGE-INDEX #x302001E3BB2D>
5: #<DOCPARSER:PACKAGE-INDEX #x302001E5997D>
6: #<DOCPARSER:PACKAGE-INDEX #x302001EAA0FD>
7: #<DOCPARSER:PACKAGE-INDEX #x302001EADD3D>
8: #<DOCPARSER:PACKAGE-INDEX #x302001EAF36D>
9: #<DOCPARSER:PACKAGE-INDEX #x302001EB36CD>
10: #<DOCPARSER:PACKAGE-INDEX #x302001EB4D7D>
11: #<DOCPARSER:PACKAGE-INDEX #x302001EBBEBD>
12: #<DOCPARSER:PACKAGE-INDEX #x302001EC635D>
13: #<DOCPARSER:PACKAGE-INDEX #x302001ECDC1D>
14: #<DOCPARSER:PACKAGE-INDEX #x302001ED171D>
15: 0

The first element:

#<PACKAGE-INDEX #x302001DF18FD>
--------------------
Class: #<STANDARD-CLASS DOCPARSER:PACKAGE-INDEX>
--------------------
 Group slots by inheritance [ ]
 Sort slots alphabetically  [X]

All Slots:
[ ]  DOCSTRING = NIL
[ ]  NAME      = "ROVE/CORE/RESULT"
[ ]  NODES     = #(#<variable *print-assertion*> #<class passed> #<class failed> #<class pending> #<class assertion> #<generic function form-description (FUNCTION ARGS VALUES &KEY NEGATIVE)> #<generic function assertion-description (ASSERTION)> #<method form-description (#'(EQL 'NOT) ARGS VALUES &KEY NEGATIVE)> #<method form-description (#'(EQL 'TYPEP) ARGS VALUES &KEY NEGATIVE)> #<method assertion-description ((ASSERTION T))> #<class test> #<generic function passedp (OBJECT)> #<generic function passed-tests (OBJECT)> #<met..