Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Scaladoc: realign-doc-source-url behavior with 2.12#10581

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
lrytz merged 1 commit intoscala:2.13.xfromlrytz:t12867
Nov 23, 2023

Conversation

@lrytz
Copy link
Member

@lrytzlrytz commentedOct 20, 2023
edited
Loading

Summary

  • In the common case, build tools pass absolute paths to the compiler for source files to compile
  • -sourcepath is used to relativize them
  • In 2.12.11,the relativized path starts with a/, sobase€{FILE_PATH_EXT} becomesbase/src/...
  • #10502 changed relativization to usesrcpathUri.relativize(fileUri), which doesn't have a leading/
  • Fix: for a relative path,foo/€{FILE_PATH} andfoo€{FILE_PATH} both emitfoo/relative/path/File (insert/ if a word character precedes€{FILE_PATH}). No such magic for absolute paths (if-sourcepath is not specified or is not a prefix of the file).

What happens without-sourcepath:

  • 2.13.11used the path that the compiler got on the command line. Soscaladoc a/B.scala would insert a relative path.
  • 2.13.12 relativizes source paths to the current directory becausePaths.get("").toUri is the current directory
  • I changed it to use an absolute path. As build tools pass absolute paths to the compiler, the behavior is the same as in 2.13.11 in the common case.

Fixesscala/bug#12867

@scala-jenkinsscala-jenkins added this to the2.13.13 milestoneOct 20, 2023
@som-snytt
Copy link
Contributor

som-snytt commentedOct 20, 2023
edited
Loading

I have a couple of branches. I'll comment if either contains a break-through.

  issue/12867-doc-url  issue/12867-scaladoc-source-link

One was from Sept 13, the longer one from Sept 20, when apparently it occurred to me to fix Scaladoc tickets?

commit d25e06dc81cd60d0efb9ffaf9239b65f341dd2cb (HEAD -> issue/12867-scaladoc-source-link)Author: Som Snytt <som.snytt@gmail.com>Date:   Thu Sep 21 17:40:22 2023 -0700    morecommit 714275ffd3ac81506dd5e15081107b1c9b38038eAuthor: Som Snytt <som.snytt@gmail.com>Date:   Wed Sep 20 20:48:09 2023 -0700    Minor refactor for readingcommit 6b994a4f30ee0cb78a5f2a28b0c6279467c890f6Author: Som Snytt <som.snytt@gmail.com>Date:   Wed Sep 20 19:10:03 2023 -0700    No inheritdoc on Iterator.sameElementscommit 51885feabfae5030b6c473db1bf463418b81d2d2Author: Som Snytt <som.snytt@gmail.com>Date:   Wed Sep 20 18:36:49 2023 -0700    Library leverages canonical urlcommit 2df1a5fff4b745102203e1d68c6e62c6552fd3f9Author: Som Snytt <som.snytt@gmail.com>Date:   Wed Sep 20 17:28:36 2023 -0700    Clean up doclet newinstance, avoid null currentRun

@lrytzlrytzforce-pushed thet12867 branch 3 times, most recently from12db79c to2ad345fCompareOctober 27, 2023 08:27
@lrytzlrytz marked this pull request as ready for reviewOctober 27, 2023 08:28
@lrytzlrytz requested a review fromsom-snyttOctober 27, 2023 08:28
@lrytz
Copy link
MemberAuthor

@SethTisue could you review this? I summarized everything in the description.

@SethTisueSethTisue self-assigned thisNov 21, 2023
@SethTisueSethTisue added prio:hihigh priority (used only by core team, only near release time) release-notesworth highlighting in next release notes labelsNov 21, 2023
Copy link
Member

@SethTisueSethTisue left a comment
edited
Loading

Choose a reason for hiding this comment

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

I've looked through this and I can't think of a flaw or fresh angle, so I'll hit "Approve", but@som-snytt, you analyzed the situation pretty thoroughly atscala/bug#12867 (comment) ; would be good to have your signoff before merge, if you can spare the time

also perhaps@armanbilge would like to have a look?

armanbilge reacted with eyes emoji
@SethTisueSethTisue removed their assignmentNov 22, 2023
@som-snytt
Copy link
Contributor

my test dirs from that day...

...    4096 Sep 20 13:38  t12876...    4096 Sep 20 14:37  t12867

Copy link
Contributor

@som-snyttsom-snytt left a comment

Choose a reason for hiding this comment

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

I happen to be tired and lacking focus at the moment, so reading even this much regex is like, I'm not going to read any more regex until after New Year's.

@som-snytt
Copy link
Contributor

@lrytz
Copy link
MemberAuthor

I'm all for a simpler regex, thanks a lot for your cleanup.

@lrytzlrytz merged commitd4f2056 intoscala:2.13.xNov 23, 2023
@SethTisueSethTisue changed the title-doc-source-url compatibility with 2.12.11Scaladoc: realign-doc-source-url behavior with 2.12Feb 10, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@SethTisueSethTisueSethTisue approved these changes

@som-snyttsom-snyttsom-snytt approved these changes

+1 more reviewer

@armanbilgearmanbilgearmanbilge left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

prio:hihigh priority (used only by core team, only near release time)release-notesworth highlighting in next release notes

Projects

None yet

Milestone

2.13.13

Development

Successfully merging this pull request may close these issues.

scaladoc 2.13.12-doc-source-url behavior change

5 participants

@lrytz@som-snytt@SethTisue@armanbilge@scala-jenkins

[8]ページ先頭

©2009-2025 Movatter.jp