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

Words containing Unit keyword cannot be used as enum values #308

Closed
Camphul opened this issue Dec 9, 2024 · 0 comments · Fixed by #315
Closed

Words containing Unit keyword cannot be used as enum values #308

Camphul opened this issue Dec 9, 2024 · 0 comments · Fixed by #315
Labels
bug Something isn't working

Comments

@Camphul
Copy link

Camphul commented Dec 9, 2024

Describe the bug
When defining an enum with a value that contains the keyword Unit, the compiler will fail.

To Reproduce
Steps to reproduce the behavior:

  1. Define an enum with some countries in them
  2. Ensure UnitedKingdom is present
  3. Setup the maven plugin according to the spring-integration example for Kotlin
  4. Try to run mvn clean compile

Expected behavior
It should compile the wirespec to valid Kotlin code.

Screenshots
image
image

Desktop (please complete the following information):

  • OS: MacOS Sequoia
  • IDE: IntelliJ & Wirespec maven plugin (using mvn cli)
  • Language: Kotlin
  • Wirespec version: 0.10.21

Additional context
The Maven pom plugin section for wirespec:

<dependency>
            <groupId>community.flock.wirespec.integration</groupId>
            <artifactId>spring-jvm</artifactId>
            <version>0.10.21</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>community.flock.wirespec.plugin.maven</groupId>
                <artifactId>wirespec-maven-plugin</artifactId>
                <version>0.10.21</version>
                <dependencies>
                    <dependency>
                        <groupId>community.flock.wirespec.integration</groupId>
                        <artifactId>spring-jvm</artifactId>
                        <version>0.10.21</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>kotlin</id>
                        <goals>
                            <goal>custom</goal>
                        </goals>
                        <configuration>
                            <input>${project.basedir}/src/main/wirespec</input>
                            <output>${project.build.directory}/generated-sources</output>
                            <emitterClass>community.flock.wirespec.integration.spring.kotlin.emit.SpringKotlinEmitter</emitterClass>
                            <shared>Kotlin</shared>
                            <extension>kt</extension>
                            <packageName>redacted</packageName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
@Camphul Camphul added the bug Something isn't working label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant