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

pkg_tar stamp default value is inconsistent with documentation #501

Closed
alokpr opened this issue Jan 6, 2022 · 4 comments
Closed

pkg_tar stamp default value is inconsistent with documentation #501

alokpr opened this issue Jan 6, 2022 · 4 comments
Assignees

Comments

@alokpr
Copy link

alokpr commented Jan 6, 2022

According to pkg_tar documentation, the default value of stamp should be -1 (which makes perfect sense).
However the actual default value is 0 (which is inconvenient).

https://github.com/bazelbuild/rules_pkg/blob/0.5.1/pkg/docs/reference.md#pkg_tar
https://github.com/bazelbuild/rules_pkg/blob/0.5.1/pkg/pkg.bzl#L447

@aiuto aiuto self-assigned this Jan 10, 2022
@aiuto
Copy link
Collaborator

aiuto commented Jan 24, 2022

//pkg/docs/reference.md is obsolete and should be removed.
The documentation is wrong. The default should be 0.
The current docs do show 0, but have other formatting problems.
https://github.com/bazelbuild/rules_pkg/blob/main/docs/latest.md

All fixed in #509.

@alokpr
Copy link
Author

alokpr commented Jan 25, 2022

I see - thanks for clarifying.

A default value of 0 is inconvenient though and also inconsistent with other bazel targets like cc_binary: https://docs.bazel.build/versions/main/be/c-cpp.html#cc_binary.stamp

Is there any specific reason for choosing 0 as the default?

@aiuto
Copy link
Collaborator

aiuto commented Jan 31, 2022

0 is the default because that causes the least surprise because it only impacts pieces of your build where you have enabled it

@aiuto
Copy link
Collaborator

aiuto commented Feb 14, 2022

Fixed in #509

@aiuto aiuto closed this as completed Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants