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

Improve error message for unexpected ftl:export #1635

Closed
matt2e opened this issue Jun 3, 2024 · 0 comments · Fixed by #1756
Closed

Improve error message for unexpected ftl:export #1635

matt2e opened this issue Jun 3, 2024 · 0 comments · Fixed by #1756
Assignees
Labels
good first issue Good for newcomers

Comments

@matt2e
Copy link
Contributor

matt2e commented Jun 3, 2024

To export a verb you write this code in go:

//ftl:verb export
func ...

We recently added the ftl:export directive for FSMs:

//ftl:export
fsm := ...

It would be easy for devs to get confused about how to make a verb exported and they may easily make the mistake of using ftl:export on a verb.
When doing so we get this error:
unexpected directive *compile.directiveExport

We should come up with a better error message explaining what they need to do to resolve the issue.

Also, do this for other declarations that can be exported but not via //ftl:export, eg: data

@matt2e matt2e added the good first issue Good for newcomers label Jun 3, 2024
@github-actions github-actions bot added the triage Issue needs triaging label Jun 3, 2024
@ftl-robot ftl-robot mentioned this issue Jun 3, 2024
@github-actions github-actions bot removed the triage Issue needs triaging label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants