Skip to content
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

Member of a @defined elements is also generated #127

Closed
carueda opened this issue Jan 20, 2022 · 1 comment
Closed

Member of a @defined elements is also generated #127

carueda opened this issue Jan 20, 2022 · 1 comment

Comments

@carueda
Copy link
Owner

carueda commented Jan 20, 2022

Describe the bug

A member of a @defined element is also generated (as if not using the annotation), but it should not.

To Reproduce

Use this input config schema:

#@define
Shared {
  c: string
  d: int
}

example {
  a: Shared
}

This will generate:

Java:

public final JavaIssue125aCfg.Shared Shared;

Scala:

Shared  : ScalaIssue125aCfg.Shared,

Expected behavior

As documented, the @define annotation by itself should only generate the corresponding type (a class in the above example) in the target language.

Target language(s):

  • Java
  • Scala

Additional context
Although not really surprising (due to the WiP status for a full shared object definition support), this was really exposed while looking into #125 .

EDIT: Actually, this used to work as intended AFAICR so this looks like a regression.

@carueda
Copy link
Owner Author

carueda commented Jan 20, 2022

Added related tests but, weird, I was not actually able to reproduce.

@carueda carueda closed this as completed Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant