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

[enhancement:DSLX] Validate "input" as a parameter at the DSLX level (long before codegen) #1710

Open
cdleary opened this issue Nov 13, 2024 · 1 comment
Labels
dslx DSLX (domain specific language) implementation / front-end enhancement New feature or request

Comments

@cdleary
Copy link
Collaborator

cdleary commented Nov 13, 2024

What's hard to do? (limit 100 words)

Right now if you use "input" as a parameter name for a function, DSLX will accept it happily, but if you try to run that through code generation it will give you:

Error: INVALID_ARGUMENT: Port `input` is a keyword.; Running pass #15: Legalize names to avoid keywords [short: name_legalization]; Running pass #15: Top level codegen pass pipeline [short: codegen]

Current best alternative workaround (limit 100 words)

Rename the argument by hand.

Your view of the "best case XLS enhancement" (limit 100 words)

Flag this as either a warning or an error at the DSLX level. I'd welcome some input on whether it's best to be a warning or an error.

@cdleary cdleary added enhancement New feature or request dslx DSLX (domain specific language) implementation / front-end labels Nov 13, 2024
@cdleary
Copy link
Collaborator Author

cdleary commented Nov 13, 2024

Also note that in is a DSLX keyword, so generically describing something that is "an input of some kind" can cause a user to bump into a few things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dslx DSLX (domain specific language) implementation / front-end enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant