#1027 Pod doc() broken ?

tcolar Mon 15 Mar 2010

In the IDE, I show the documentation of types/pod when doing using completion.

With the latest version, it seems the "pod" doc() method always return null (almost sure at least some pods had some basic doc before.

The doc() method of Pod seem to always return null now :

Fantom Shell v1.0.51 ('?' for help)
fansh> Pod.find("fwt").doc()
null

Was the doc removed or is that a bug ?

Thanks.

brian Mon 15 Mar 2010

If you remember we reworked pod doc's to move docLib into the pods.

The summary doc is available for pod.meta["pod.summary"]

tcolar Mon 15 Mar 2010

Ok, I guess i vaguely remember that :)

Shouldn't Pod.doc() either be obsoleted or be a shortcut for pod.meta["pod.summary"] then.

Thanks.

brian Mon 15 Mar 2010

We have three options:

  1. remove Pod.doc
  2. have it return fandoc of pod (or null if not found)
  3. convenience for pod.summary

I lean towards option 1

tactics Mon 15 Mar 2010

Ax it. It's not typical for users to need to see the pod's summary in the code. There's no need for a convenience method.

KevinKelley Mon 15 Mar 2010

I'm hoping for 2, I think pod fandoc ought to be reflected, and Pod.doc sounds like an obvious place to look for it... keeping in the meta map would seem okay too, as long as it's accessible somehow.

pod.summary is good to have, as a tooltip or status-line inform, too.

tcolar Mon 15 Mar 2010

removing it sounds fine, since there is meta.

tactics Mon 15 Mar 2010

I'm hoping for 2

If you do keep it, it would be better to rename it Pod.summary to keep consistent with how it's specified in BuildPod.

KevinKelley Mon 15 Mar 2010

err... there's actually two things, here: Pod.summary comes from the build.fan file:

podName = "sys"
summary = "Fantom system runtime"

and then there's the pod.fandoc file, that gets compiled into html and linked into the html doc tree.

Since pod.fandoc is oriented toward building the html doc system, it's maybe not exactly "pod meta-info". But, since it's now being included in the pod, it seems like a good idea to have a defined api to get at it, reflectively.

brian Mon 15 Mar 2010

I think the correct behavior is to return the fandoc chapter if available or null if not. I pushed a fix to implement this behavior.

Login or Signup to reply.