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

Unable to flatten a model using the flattenAndRemoveMixins transform with AST #2555

Open
mullermp opened this issue Mar 6, 2025 · 4 comments

Comments

@mullermp
Copy link
Contributor

mullermp commented Mar 6, 2025

Given smithy-build.json

{
  "version": "1.0",
  "projections": {
    "source": {
      "transforms": [
        {
          "name": "flattenAndRemoveMixins"
        }
      ]
    }
  }
}

And a vanilla mixin model as model.smithy:

$version: "2"

namespace smithy.ruby.tests

@mixin
structure UserIdentifiersMixin {
    id: String
}

structure UserDetails with [UserIdentifiersMixin] {
    alias: String
}

I'm not able to get a flattened version using smithy ast -c smithy-build.json model.smithy

@mullermp
Copy link
Contributor Author

mullermp commented Mar 6, 2025

@kstich if you don't mind since you added this.

@mullermp
Copy link
Contributor Author

mullermp commented Mar 6, 2025

I'm aware of the --flatten option but the config file should be respected if it's passed into the ast command.

@kstich
Copy link
Contributor

kstich commented Mar 6, 2025

This should be resolved when #2552 ships.

@mullermp
Copy link
Contributor Author

mullermp commented Mar 6, 2025

Thanks. Tangentially, if you were able to fix config support for the AST command for mixins, could you do it for prelude as well? #2500 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants