-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deno doc --html panics when no file paths are provided #21067
Comments
It looks like it's the html code that's panicking? I opened a separate issue about lint here: #21070 I think your confusion is around not providing any file paths. For example, you should do
|
I believe this issue was rather meant as a suggestion to improve usability, not a question on how to use the CLI. It's an amazing feature and a great step forward, but the above journey highlights some rough edges that hint at ways to make the thing more intuitive. |
@KnorpelSenf there were some bugs reported here (as per the title, |
What I'm thinking will make this more clear is for |
I opened #21084 -- Thanks for the feedback! |
…ed (#21084) As pointed out in #21067 , it's confusing that `deno doc --lint mod.ts` outputs the documentation to stdout on success. Instead, it would be better if it outputted how many files were checked similar to what `deno lint` does on success. It still outputs the documentation if `--lint` or `--html` are provided so this is non-breaking.
I feel a bit trolled here as you first edited the title and then reference it as it's about something else. This issue is about my confusion using The blog post stated it's heavily inspired by the Rust tooling which I know and like so I expected something similar and was as you said confused by it's usage then. Yes it also paniced on my journey of trying it but mainly my journey was horrible due to inconsitencies. For example because of a The idea of having a tool that is similar to what Rust offers is great but Deno isn't there yet. It's promising but I was pointing out whats lacking and confusing in my opinion. As I said I am used to Rust and cargo is an easy to use tool helping me with my project. Deno definitely can and wants to be as easy to use and I wanted to point out pain points with my issue to get there.
Personally I think when the intuitive usage is not working the tool should be more intuitive instead of suggesting how to use it correctly.
I am not sure which user needs that in the first place. Either I want the documentation then I don't care about lints or I want to ensure good documentation quality then I don't need the docs printed out, only what can be improved. For example a CI step ensuring good documentation doesn't need to print out the documentation in the process.
My first intention when reading this was to just copy the text and create a new issue with my initial title and remove the part about the panic (It's only in the title and never mentioned in my text, only in the plaintext block). That's clearly not helpful and I went to bed. #21084 showed that you actually read my indented goal of my issue which I didn't expected after yesterdays response. I still would like to have TypeScript tooling which is as great as cargo is. As my attempt with this issue didn't went as planned: How should I suggest something then? Personally I see these "suggestions" in my initial text:
|
Sorry, when an issue is opened with a bug (panic as was in the original title), then that will likely become what the issue is about and it will likely be closed by the fix. I edited the issue title to make it easier for people who have the same issue to search for it. As I mentioned before, it's best to keep issues focused to one topic.
Yup, entrypoints for libraries are coming in a future release, which should make this easier (I'm actually working on some of this next week, but it probably won't be released for several months because it's part of Deno 2.0). We also want to use that for some type checking optimizations. There is currently no way to know what the entrypoints are which is why explicit arguments are required for For type checking, see #20813
The documentation output is necessary in order to do these checks. I have been thinking that once entrypoints lands then the lint command with no args could run these extra lint checks as well, but Anyway, I think #21084 has largely addressed the feedback here. Thanks again! |
I read about the new
deno doc --lint
command and wanted to try it in a project.I never used
deno doc
before but know and likecargo doc
a lot.First I used just
deno doc --lint
which printed out a huge unrelated list which ended with some Web Assembly stuff which isn't directly related to any source code I wrote. From a lint command I expected lint output which wasn't the case here.--html
is new, maybe it builds the HTML docs then and output will only contain the lints I want?Alright, I'll add a
--name=bla
.After that I tried
deno doc
and found out that it also prints this long list of project unrelated documentation when not specified with a source code file which doesn't feel intuitive to me.deno lint
ordeno fmt
don't need arguments, why doesdeno doc
needs some?deno check
enforces me to specify some (which is annoying) butdeno doc
just quietly accepts no arguments there. It's inconsistent (and still annoying to specify some, after all I still use it within my project, I don't want to specify more stuff, it should be as simple ascargo doc
(orcargo check
for that matter).deno.jsonc
probably needs to know an entry point for that (Rust just assumessrc/main.rs
orsrc/lib.rs
).Also, why is the
doc --lint
command outputting documentation and not just lints? It doesn't seem that helpful and concise to me. After playing around a bit I found out that it is outputting the documentation when there is no lint. Why isn't it just showing "everything is fine" and leave the output to its specific command unrelated to--lint
to be less confusing?To end this more positively: I like the idea of lints to improve the documentation a lot.
cargo doc
does a great job here. I like that Deno tries to have something like that for TypeScript too and I want to use that!The text was updated successfully, but these errors were encountered: