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

ergo errors when adding -with-msg #202

Open
ringods opened this issue Dec 13, 2024 · 2 comments
Open

ergo errors when adding -with-msg #202

ringods opened this issue Dec 13, 2024 · 2 comments

Comments

@ringods
Copy link

ringods commented Dec 13, 2024

Describe the bug

I got an error generating a setup using ergo:

Generating project "backend-migrator"...
   generating "backend-migrator/apps/migrator/backend.go"
   generating "backend-migrator/apps/migrator/tracker.go"
   generating "backend-migrator/apps/migrator/supervisor.go"
   generating "backend-migrator/apps/migrator/migrator.go"
   generating "backend-migrator/types.go"
---
package backend-migrator

import (
        "ergo.services/ergo/gen"
        "ergo.services/ergo/net/edf"
)

type DataToMigrate struct{
        // Add your fields
}
func init() {
        types := []any{
        DataToMigrate{},
        }

        for _, t := range types {
                err := edf.RegisterTypeOf(t)
                if err == nil || err == gen.ErrTaken {
                        continue
                }
                panic(err)
        }
}

---
error: 1:16: expected ';', found '-'

To Reproduce
Steps to reproduce the behavior:

  1. Install the ergo tool using go install ergo.services/tools/ergo@latest
  2. Generate a setup using the command below
  3. See error
${GOPATH}/bin/ergo -path . \
    -init migrator{module:github.com/ringods/backend-migrator} \
    -with-app Migrator \
    -with-sup Migrator:Supervisor \
    -with-actor Supervisor:Backend \
    -with-actor Supervisor:Tracker \
    -with-msg DataToMigrate

Expected behavior
Initial setup correctly generated. Generation works if I drop the -with-msg argument.

Environment (please complete the following information):

  • Arch: aarch64
  • OS: macOS 15.1.1
  • Framework Version 3.0.0 (latest)
@halturin
Copy link
Collaborator

thank you for the report. I'll take a look

@halturin
Copy link
Collaborator

please, use https://github.com/ergo-services/tools/issues next time for the issues related to ergo tool

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