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

Replace util.env("WING_TARGET") with @app.target everywhere #7098

Closed
Chriscbr opened this issue Sep 9, 2024 · 3 comments
Closed

Replace util.env("WING_TARGET") with @app.target everywhere #7098

Chriscbr opened this issue Sep 9, 2024 · 3 comments
Labels
📚 documentation Improvements or additions to documentation ✨ enhancement New feature or request 👠 platforms Issues relating to Wing Platform Providers 🎨 sdk SDK

Comments

@Chriscbr
Copy link
Contributor

Chriscbr commented Sep 9, 2024

Use Case

Getting the current target through an environment variable is a bit weird and it requires an extra import. I think it might be better if we expose the "platform string" through a field like @app.target. This might require updating our existing platforms.

I don't think there's any critical need to deprecate the old API. But it will feel good to update our code examples and tests and winglibs to use the new syntax.

Proposed Solution

No response

Implementation Notes

No response

Component

Documentation

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
  • If this issue is labeled needs-discussion, it means the spec has not been finalized yet. Please reach out on the #dev channel in the Wing Discord.
@Chriscbr Chriscbr added 📚 documentation Improvements or additions to documentation ✨ enhancement New feature or request 🎨 sdk SDK 👠 platforms Issues relating to Wing Platform Providers labels Sep 9, 2024
@monadabot monadabot added this to Wing Sep 9, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New - not properly defined in Wing Sep 9, 2024
@Chriscbr
Copy link
Contributor Author

We could also name it simply @target

@boyney123
Copy link
Contributor

Yeah I think having @app.target or @target feels clean to me. TBH I actually prefer the @target naming... for what its worth

@Chriscbr
Copy link
Contributor Author

Added @target in #7161

@github-project-automation github-project-automation bot moved this from 🆕 New - not properly defined to ✅ Done in Wing Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 documentation Improvements or additions to documentation ✨ enhancement New feature or request 👠 platforms Issues relating to Wing Platform Providers 🎨 sdk SDK
Projects
Status: Done
Development

No branches or pull requests

2 participants