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

logging: always show source locations as absolute paths #10460

Merged
merged 1 commit into from Jun 16, 2022

Conversation

dhellmann
Copy link
Contributor

Subject: logging: always show source locations as absolute paths

Feature or Bugfix

  • Bugfix

Purpose

Nodes attached to the parse tree via the include directive have
their source attribute set to the relative path of the included
file. Other nodes in the tree use the full absolute path. For
consistent logging, ensure that the node location is always expressed
as an absolute path, when the filename is known.

Detail

Relates

See sphinx-contrib/spelling#153 for an
example of the effect of the original problem.

@tk0miya tk0miya added api:cmdline type:proposal a feature suggestion labels May 22, 2022
@tk0miya tk0miya added this to the 5.1.0 milestone May 22, 2022
@tk0miya tk0miya requested a review from shimizukawa May 22, 2022 06:41
Copy link
Member

@tk0miya tk0miya left a comment

Choose a reason for hiding this comment

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

LGTM. Before merging, I'd like to wait for the opinion of @shimizukawa for a while.

Copy link
Member

@shimizukawa shimizukawa left a comment

Choose a reason for hiding this comment

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

LGTM.
I can't think of a case where that would be a problem.

@dhellmann dhellmann force-pushed the log-location-included-nodes branch from 704f587 to b9792f9 Compare May 22, 2022 13:37
@dhellmann
Copy link
Contributor Author

I added a unit test for the new behavior.

@dhellmann dhellmann force-pushed the log-location-included-nodes branch from b9792f9 to d081ea3 Compare May 22, 2022 13:38
Nodes attached to the parse tree via the `include` directive have
their `source` attribute set to the relative path of the included
file. Other nodes in the tree use the full absolute path. For
consistent logging, ensure that the node location is always expressed
as an absolute path, when the filename is known.

See sphinx-contrib/spelling#153 for an
example of the effect of the original problem.
@dhellmann dhellmann force-pushed the log-location-included-nodes branch from d081ea3 to f246104 Compare May 22, 2022 14:10
@AA-Turner AA-Turner merged commit 9c9a52d into sphinx-doc:5.x Jun 16, 2022
AA-Turner added a commit to AA-Turner/sphinx that referenced this pull request Jun 16, 2022
AA-Turner added a commit that referenced this pull request Jun 16, 2022
AA-Turner added a commit to AA-Turner/sphinx that referenced this pull request Jun 16, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api:cmdline type:proposal a feature suggestion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants