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

Warn on error when entrypoint argument has private members #6582

Open
asterite opened this issue Nov 21, 2024 · 0 comments
Open

Warn on error when entrypoint argument has private members #6582

asterite opened this issue Nov 21, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@asterite
Copy link
Collaborator

Problem

Consider this code:

mod foo {
    pub struct Foo {
        inner: Field,
    }
}

use foo::Foo;

struct Bar {
    foo: Foo,
}

fn main(bar: Bar) {}

Happy Case

The above code should probably warn or error. See this comment:

Idea being that we're breaking encapsulation of that private member because a user needs to input it when ABI encoding. If I add a new field then that's now a breaking change.

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

None

Blocker Context

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@asterite asterite added the enhancement New feature or request label Nov 21, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant