Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Potential name clash between components and events/commands in generated code #957

Closed
jamiebrynes7 opened this issue May 24, 2019 · 2 comments
Labels
A: codegen Area: Code generation S: known-issue Status: This is a known issue T: bug Type: This is a bug

Comments

@jamiebrynes7
Copy link
Contributor

Affects: Release v0.1.0 and up
Internal Ticket: UTY-1962


Description

Given a schema file like one of the following:

package name;

type Foo {
    float test_field = 1;
}

component Bar
{
    id = 200;
    event Foo bar;
}
package name;

type Foo {
    float test_field = 1;
}

component Bar
{
    id = 200;
    command Foo bar(Foo);
}

The code generator will generate invalid C# code that does not compile.

Note this occurs when the name of a component and the name of an event/command inside that component are the same

Workaround

Rename either the component or the event/command.

@jamiebrynes7 jamiebrynes7 added T: bug Type: This is a bug A: codegen Area: Code generation S: known-issue Status: This is a known issue labels May 24, 2019
@paulbalaji
Copy link
Contributor

A resolution has been merged and will be part of our 0.3.1 release next week.

@jamiebrynes7
Copy link
Contributor Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A: codegen Area: Code generation S: known-issue Status: This is a known issue T: bug Type: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants