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

print in a module appears to be different from print in a workspace rule #14526

Closed
shs96c opened this issue Jan 7, 2022 · 4 comments
Closed
Labels
area-Bzlmod Bzlmod-specific PRs, issues, and feature requests P3 We're not considering working on this, but happy to review a PR. (No assignee) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request

Comments

@shs96c
Copy link
Contributor

shs96c commented Jan 7, 2022

Description of the problem / feature request:

print appears to behave differently between workspace rules and when used in a module.

When called from a workspace, the output of print is prefixed by a DEBUG statement, and then the path to the file, whereas this is missing when the same function is called from a module.

What's the output of bazel info release?

5.0.0rc3

Any other information, logs, or outputs that you want to share?

The way that print works when called from a workspace is nicer: it makes the output easy to identify and it's easy to grep for.

@oquenchil oquenchil added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: support / not a bug (process) untriaged labels Jan 11, 2022
@oquenchil
Copy link
Contributor

@meteorcloudy

@meteorcloudy meteorcloudy added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website labels Jan 11, 2022
@meteorcloudy
Copy link
Member

meteorcloudy commented Jan 11, 2022

/cc @Wyverald

@Wyverald
Copy link
Member

Yeah there's a bunch of quality-of-life changes we should make around the Starlark-running part of bzlmod before official launch.

@meteorcloudy meteorcloudy added the area-Bzlmod Bzlmod-specific PRs, issues, and feature requests label Jan 11, 2022
@fmeum
Copy link
Collaborator

fmeum commented Jun 8, 2022

This goes even further: If a module extension specifies incorrect attributes for a repository rule, an error is printed but the build doesn't fail.

fmeum added a commit to fmeum/bazel that referenced this issue Jul 3, 2022
Previously, messages printed with `print()` didn't have the usual
`DEBUG:` prefix.

Fixes bazelbuild#14526
fmeum added a commit to fmeum/bazel that referenced this issue Jul 3, 2022
Also emit a Starlark stack trace pointing to the particular call site
of the repository rule.

Previously, the root cause error would be printed, but the build would
continue.

Fixes bazelbuild#14526 (comment)
fmeum added a commit to fmeum/bazel that referenced this issue Jul 4, 2022
Also emit a Starlark stack trace pointing to the particular call site
of the repository rule.

Previously, the root cause error would be printed, but the build would
continue.

Fixes bazelbuild#14526 (comment)
copybara-service bot pushed a commit that referenced this issue Jul 5, 2022
Fail the build on repository rule errors in a module extension

Also emit a Starlark stack trace pointing to the particular call site
of the repository rule.

Previously, the root cause error would be printed, but the build would
continue.

Fixes #14526 (comment)

Closes #15796.

PiperOrigin-RevId: 459065865
Change-Id: I2444378c7857b1031fabfacd00f8246583bb2146
sgowroji pushed a commit to sgowroji/bazel that referenced this issue Jul 14, 2022
Previously, messages printed with `print()` didn't have the usual
`DEBUG:` prefix.

Fixes bazelbuild#14526

Closes bazelbuild#15795.

PiperOrigin-RevId: 459052873
Change-Id: I1b75498d448aaae137dd63ea0a418572097bdac2
sgowroji pushed a commit to sgowroji/bazel that referenced this issue Jul 14, 2022
Fail the build on repository rule errors in a module extension

Also emit a Starlark stack trace pointing to the particular call site
of the repository rule.

Previously, the root cause error would be printed, but the build would
continue.

Fixes bazelbuild#14526 (comment)

Closes bazelbuild#15796.

PiperOrigin-RevId: 459065865
Change-Id: I2444378c7857b1031fabfacd00f8246583bb2146
sgowroji added a commit that referenced this issue Jul 15, 2022
Previously, messages printed with `print()` didn't have the usual
`DEBUG:` prefix.

Fixes #14526

Closes #15795.

PiperOrigin-RevId: 459052873
Change-Id: I1b75498d448aaae137dd63ea0a418572097bdac2

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Co-authored-by: Chenchu K <ckolli@google.com>
fmeum added a commit to fmeum/bazel that referenced this issue Jul 20, 2022
Fail the build on repository rule errors in a module extension

Also emit a Starlark stack trace pointing to the particular call site
of the repository rule.

Previously, the root cause error would be printed, but the build would
continue.

Fixes bazelbuild#14526 (comment)

Closes bazelbuild#15796.

PiperOrigin-RevId: 459065865
Change-Id: I2444378c7857b1031fabfacd00f8246583bb2146
fmeum added a commit to fmeum/bazel that referenced this issue Jul 20, 2022
Fail the build on repository rule errors in a module extension

Also emit a Starlark stack trace pointing to the particular call site
of the repository rule.

Previously, the root cause error would be printed, but the build would
continue.

Fixes bazelbuild#14526 (comment)

Closes bazelbuild#15796.

PiperOrigin-RevId: 459065865
Change-Id: I2444378c7857b1031fabfacd00f8246583bb2146
fmeum added a commit to fmeum/bazel that referenced this issue Jul 20, 2022
Fail the build on repository rule errors in a module extension

Also emit a Starlark stack trace pointing to the particular call site
of the repository rule.

Previously, the root cause error would be printed, but the build would
continue.

Fixes bazelbuild#14526 (comment)

Closes bazelbuild#15796.

PiperOrigin-RevId: 459065865
Change-Id: I2444378c7857b1031fabfacd00f8246583bb2146
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Bzlmod Bzlmod-specific PRs, issues, and feature requests P3 We're not considering working on this, but happy to review a PR. (No assignee) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request
Projects
None yet
5 participants