akka / akka

Build highly concurrent, distributed, and resilient message-driven applications on the JVM
https://akka.io
Other
13.04k stars 3.59k forks source link

It will kind to add "include"s to code exaples to simplify cut'n'paste for lay people #21626

Open ac2epsilon opened 8 years ago

ac2epsilon commented 8 years ago

Really it's annoing to investigate symbol origins, while some half of people not use ides with completing

johanandren commented 8 years ago

Adding the imports to selected samples (all would be a lot, and the Java samples for example cannot have imports anywhere else than in the beginning of the file) would be a great improvement, PRs warmly welcome.

We are likely transitioning to a new doc solution soon though, so it might be best to wait for that, maybe we can figure out some way to do something clever with the tooling there.

johanandren commented 8 years ago

It would be good to first identify which samples in the docs would benefit from containing the imports for easier copy-pasta before anyone creates a PR of this.

ac2epsilon commented 8 years ago

As I can see we're looking for some automation. Lets say if code ( maybe more then one-line-long, nowhy) and keeps something Scaladoc-umented... As I consider every documented leaf-level symbol can be considered as tag and automatically underlined with link. Technical issues? Let's rewrite doc engine

2016-10-07 1:05 GMT+03:00 Johan Andrén notifications@github.com:

It would be good to first identify which samples in the docs would benefit from containing the imports for easier copy-pasta before anyone creates a PR of this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/akka/akka/issues/21626#issuecomment-252102018, or mute the thread https://github.com/notifications/unsubscribe-auth/AI2C0K8jn1NP0eqB3JdGW6uJCN9ak6zUks5qxXCpgaJpZM4KPNEV .

patriknw commented 8 years ago

I don't think this should be automated. Imports should be selected carefully to not pollute the example snippets. For example a doc page may start with saying that below examples assume import akka.actor.*;

hhimanshu commented 7 years ago

@johanandren , shall we wait for new doc solution and not pick any community tag items related to documentation?

patriknw commented 7 years ago

Feel free to continue with small improvements to current docs.

Captain1653 commented 3 years ago

The issue is really old and looks like duplicate #17650 . Am I wrong? Is it worth to close it?

Kind regards

johanandren commented 3 years ago

This one is not completed, it is about making the needed imports for the code show in the doc snippet, it is a very large amount of work to do for every sample snippet, I'm not even convinced it is worth doing to each and every snippet to be honest. Definitely the introductory snippets and more complete ones, but for example the stream operator usage snippets maybe not as useful.