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

Update all the things and fix/finish the worker implementation #25

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

jjudd
Copy link
Contributor

@jjudd jjudd commented Sep 9, 2024

No description provided.

arg[File]("<outputDirectory>").required().action { (value, config) =>
config.copy(generatedDirectory = value)
arg[Path]("<outputDirectory>").required().action { (outputDirectory, config) =>
config.outputDirectory = SandboxUtil.getSandboxPath(workDir, outputDirectory)

Choose a reason for hiding this comment

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

Nit: I'm not a huge fan of the mutability here. What's wrong with .copy? If we're trying to micro-optimize, are the benefits really worth it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Speed is the reason. I do think it's worth it because that many object copies is not very fast.

Also I'm not too worried about it as the only uses of this object are in this file, it's very short, and reasoning about correctness is much easier than a larger codebase.

Copy link

@jadenPete jadenPete Sep 10, 2024

Choose a reason for hiding this comment

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

I'm assuming this and JarHelper.java were copied verbatem from Bazel, so I'm not going to fully review them. That being said, is there any way we can depend on these (e.g. by pulling in Bazel's code as a sub-repository) instead of copying them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. I haven't been able to figure out how to depend on this, so whenever I've needed it I just copy it.

@jjudd jjudd merged commit 65f49e4 into master Sep 11, 2024
2 checks passed
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.

3 participants