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

opt.output: default file name (for apk or aab) is now name of the work dir #277

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scriptmaster
Copy link

What this PR does and why

When issuing vab . or vab run . the default file name produced is based on a hard-coded string (V Test App). This PR changes the default file name produced to the work dir (similar to what v compiler does).

Why

The default .apk or .aac file name is not matching with the expectation of how a v . does, hence this PR.

@Delta456 Delta456 requested a review from larpon December 29, 2023 08:17
default_file_name := opt.app_name.replace(os.path_separator.str(), '').replace(' ',
mut default_file_name := ''
if opt.app_name == android.default_app_name {
default_file_name = os.getwd().all_after_last('/').replace(os.path_separator.str(), '').replace(' ',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name should be resolved from opt.input not os.getwd() as vab can be run from anywhere:
See this example where I've built vab from this PR on my machine:
image

In this case the output should have been resolved to bezier.apk but it produced instead vab.apk

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this example, it is already in the V main repository.
Our goal is to have as many as V's examples compatible with vab as possible and since V is one of vab's dependencies already it avoids (a lot of) code duplication that needs to be maintained in two places.

Users can use V's gg examples for testing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole file needs formatting via v fmt

@spytheman spytheman marked this pull request as draft January 14, 2024 09:57
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

Successfully merging this pull request may close these issues.

None yet

2 participants