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

Adding a default value in the generator does not update class or trait definition #577

Closed
ClotildeToullec opened this issue Apr 4, 2023 · 1 comment · Fixed by moosetechnology/Fame#82
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ClotildeToullec
Copy link
Member

To reproduce:

  • In a generator (ex: FamixTest6Generator), add a property to a class or trait
spam property: #isTasty type: #Boolean
  • Generate
FamixTest6Generator generate

The property is created and declared in the definition of FamixTest6Spam.

  • Back in the generator, add a default value:
spam property: #isTasty type: #Boolean defalutValue: true
  • Generate again. The default value is visible in the getter but not in the class definition
    The test FmxMBGeneratorTest>>#testGeneratorsAreUpToDate
@ClotildeToullec
Copy link
Member Author

The problem seems to be in the compiler.
We give a correct slot definition but the Opal compiler does not take it into account.

On our side: FmxMBRealRingEnvironment>>#collectChangesToApplyis correct: there is a change to apply on the slot.
We send its definition to the environment, it is still correct.

When it comes to OpalCompiler>>#evaluate, the change does not occur. No idea why, we need help from the Pharo team.

TODO: Work with the Pharo team (Marcus)

@ClotildeToullec ClotildeToullec added bug Something isn't working help wanted Extra attention is needed and removed Sprint labels Aug 25, 2023
@ClotildeToullec ClotildeToullec self-assigned this Aug 25, 2023
fouziray added a commit to fouziray/Famix that referenced this issue Jul 19, 2024
The original cause of this issue is in the Fame repository. The fix is in moosetechnology/Fame#82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants