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

Support for BuildInfo #2106

Closed
Gedochao opened this issue May 10, 2023 Discussed in #2051 · 2 comments · Fixed by #2249, #2310, #2325 or #2350
Closed

Support for BuildInfo #2106

Gedochao opened this issue May 10, 2023 Discussed in #2051 · 2 comments · Fixed by #2249, #2310, #2325 or #2350
Assignees
Labels
enhancement New feature or request

Comments

@Gedochao
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Discussed in #2051

Originally posted by ckipp01 April 23, 2023
I have a use case where I'm building a CLI app. A lot of times with apps like this you want to make sure you can display the version of the app via a command, and many times the value of that version is persisted utilizing a form of BuildInfo where based on git, or something else a file is generated and used for compilation. Is there any way to mimic something like this with scala-cli? All the solutions I'm coming up with request running scala-cli to generate a file first, and then running it again on your main project to utilize that created file. However, it'd be great if this could just be done in a single step somehow. Any ideas?

Describe the solution you'd like
We could have a directive/command-line option exposing BuildInfo data in the project.

//> using build.info

Describe alternatives you've considered
This could potentially also be delivered through code generators. (see #610)

Additional context
See the discussions in #2051 and #610.

@Gedochao Gedochao added the enhancement New feature or request label May 10, 2023
@Gedochao
Copy link
Contributor Author

cc @ckipp01

@ckipp01
Copy link
Contributor

ckipp01 commented May 10, 2023

👍🏼 thanks for creating this @Gedochao. At least for my specific use case just having

//> using build.info

Wouldn't be enough since it wouldn't really know where to pull the version from. So having #610 would also be necessary to somehow grab the version and store it in the actual build info.

@MaciejG604 MaciejG604 self-assigned this Jun 30, 2023
@MaciejG604 MaciejG604 linked a pull request Jul 6, 2023 that will close this issue
@MaciejG604 MaciejG604 reopened this Jul 25, 2023
@MaciejG604 MaciejG604 linked a pull request Aug 3, 2023 that will close this issue
@tgodzik tgodzik moved this to Done in Issue Board Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment