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
Currently the modules and types generated by java_package are all pub. This seems unlikely to be the right thing for most customers (for one thing, the documentation of java_package is hard to read and lacks variable names).
It seems like pub(crate) is probably the right option for modules. The inner types could be either pub or pub(crate)
We would then add another invocation path to access the old behavior of creating pub modules/structs. A few possible APIs for this:
// assuming we want to maintain the current invariant that the main block of the proc macro is _exactly_ the output from javap.
duchess::java_package!(vis:pub){
package auth;
class Authenticated{*}}
if we are OK breaking from the strict mapping between javap output:
duchess::java_package! {
#[pub]
package auth;
#[pub]
class Authenticated{*}}
or addition of a new top level API:
duchess::public_java_package! {
package auth;
class Authenticated{*}}
The last and final option is to provide no api for this and document workaround via pub use
The text was updated successfully, but these errors were encountered:
if we are OK breaking from the strict mapping between javap output:
I think it is important that it is possible to copy and paste javap into java_package, but I think it's also ok to have extra stuff (and indeed we already do, e.g., { * } not javap output).
Currently the modules and types generated by
java_package
are allpub
. This seems unlikely to be the right thing for most customers (for one thing, the documentation ofjava_package
is hard to read and lacks variable names).It seems like
pub(crate)
is probably the right option for modules. The inner types could be either pub orpub(crate)
We would then add another invocation path to access the old behavior of creating
pub
modules/structs. A few possible APIs for this:if we are OK breaking from the strict mapping between
javap
output:or addition of a new top level API:
The last and final option is to provide no api for this and document workaround via
pub use
The text was updated successfully, but these errors were encountered: