You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anchor prelude paths are included in docs.rs. They should not be included because prelude is just a helper module (that is what the rust std docs do at least).
Account is exported directly under the root. It should be exported with its proper path (anchor_lang::accounts::account::Account).
Account is just one example of many. For Account (and the other types in the accounts folder) it can be solved by removing the Account export in lib.rs, making the accounts mod in lib.rs a pub mod and exporting accounts::account::Account in the prelude instead of just Account. Doing it this way makes Account a re-export instead of a struct inside prelude.
I dont think doc(hidden) on the prelude mod is the solution because if you search for it, you should find it, but its members shouldnt show up in the search because theyre just re-exports (or they should be re-exports, but arent right now, which is causing these problems)
The text was updated successfully, but these errors were encountered:
open question: how to deal with crates like anchor_attribute_account. These are also currently not re-exported by anchor and can therefore be found in the docs in the prelude module, but not anywhere else. If the prelude just re-exported these, they could not be found in the docs of anchor_lang at all. So maybe it makes sense to leave these as they are or move them into a new module inside anchor_lang from which the prelude re-exports them (so we dont have prelude paths in the docs)
yes. I didnt mean that we should actually move them into anchor_lang.
prelude currently pub uses them but this does not re-export them (any idea why?). instead it defines them as members of prelude. my idea is to have a separate module pub use them. that way, they can be found in the docs via that module because it wont reexport them either. but I havent managed to reexport them from that module by the prelude yet. it still defines them as members of prelude.
Example:
prelude
paths are included indocs.rs
. They should not be included becauseprelude
is just a helper module (that is what the rust std docs do at least).Account
is exported directly under the root. It should be exported with its proper path (anchor_lang::accounts::account::Account
).Account is just one example of many. For Account (and the other types in the accounts folder) it can be solved by removing the Account export in
lib.rs
, making the accounts mod inlib.rs
apub mod
and exportingaccounts::account::Account
in the prelude instead of justAccount
. Doing it this way makesAccount
a re-export instead of a struct insideprelude
.I dont think
doc(hidden)
on the prelude mod is the solution because if you search for it, you should find it, but its members shouldnt show up in the search because theyre just re-exports (or they should be re-exports, but arent right now, which is causing these problems)The text was updated successfully, but these errors were encountered: