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

[alias] attribute #2349

Open
casey opened this issue Sep 6, 2024 · 3 comments
Open

[alias] attribute #2349

casey opened this issue Sep 6, 2024 · 3 comments

Comments

@casey
Copy link
Owner

casey commented Sep 6, 2024

PR #2344 added a new attribute, [alias] providing an alternative way for declaring recipe aliases. I personally lean towards not adding a new attribute, but I don't feel super strongly, so if it's something that people wanted, I wouldn't mind adding it.

I think ideally, would take a string literal: [alias: "foo"], which would initially be constrained to be a valid identifier. This could be relaxed in the future to allow non-identifier aliases.

See the original PR for some of the discussion.

@runeimp
Copy link

runeimp commented Sep 9, 2024

I like the idea of keeping all parts of a recipe in one place. Especially when considering modules, etc.

@marcaddeo
Copy link
Contributor

@casey I'm not sure if you had a chance to fully review the original PR, but my first commit is my first attempt in which I tried to use the [alias("string")] syntax.

I wasn't liking how the code turned out, and felt like I was fighting Just to implement it. That's why I moved to using Identifiers/Names/Tokens (not sure which is the most technically correct qualifier here 😄), and because aliases are already processed that way.

I've made a couple more attempts at implementing it with strings, but haven't been successful.

Would love to make another attempt and get this feature eventually merged, but if you could possibly point me in the right direction for implementing this with strings (if you've got any ideas for it) that would be super helpful.

@casey
Copy link
Owner Author

casey commented Sep 14, 2024

I'm still honestly not totally sold on this feature, since it feels like it just duplicates the existing way of creating aliases. just is already pretty bloated 😅 Although in some ways that's what makes it a nice tool. So I don't want to send you off trying to get strings to work if it won't ultimately get merged. I think I'm inclined to let this issue sit for a bit before acting on it, to get some more feedback.

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

3 participants