[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-28 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-28 Thread Paul Kirth via cfe-commits
@@ -1,48 +1,22 @@ -// Append using posix-style a file name or directory to Base -function append(Base, New) { - if (!New) -return Base; - if (Base) -Base += "/"; - Base += New; - return Base; -} - -// Get relative path to access FilePath from CurrentDirectory -function

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-28 Thread Paul Kirth via cfe-commits
@@ -1,48 +1,22 @@ -// Append using posix-style a file name or directory to Base -function append(Base, New) { - if (!New) -return Base; - if (Base) -Base += "/"; - Base += New; - return Base; -} - -// Get relative path to access FilePath from CurrentDirectory -function

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-29 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/93281 >From f5872e7c82d097ae3c141765d3f1d7e3d0b25b82 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 24 May 2024 04:28:08 -0400 Subject: [PATCH 1/3] clang-doc switched from using relative to absolute paths ---

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-29 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 8823448807f3b1a1362d1417e062d763734e02f5 48ceff111ef4ce2bfd6c9dd4ec7df272b35f3872 --

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-29 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-29 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-29 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/93281 >From f5872e7c82d097ae3c141765d3f1d7e3d0b25b82 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 24 May 2024 04:28:08 -0400 Subject: [PATCH 1/3] clang-doc switched from using relative to absolute paths ---

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-29 Thread Paul Kirth via cfe-commits
@@ -979,6 +980,17 @@ static llvm::Error serializeIndex(ClangDocContext &CDCtx) { "error creating index file: " + FileErr.message()); } + llvm::SmallString<128> RootPath(CDCtx.OutDirectory); + if (llvm

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-29 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: This is almost there. I've left a few minor comments, but I'd like to see better testing here. I'm awfully surprised we don't need to update any test lines, other than the 1 JS check. It would really help to see how the output is changing, if that was capt

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-29 Thread Paul Kirth via cfe-commits
@@ -7,6 +7,7 @@ // RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Rectangle.html -check-prefix=HTML-RECTANGLE // RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Circle.html -check-prefix=HTML-CIRCLE +// JSON-INDEX: var RootPath = "{{.*}}"; ilove

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-29 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-29 Thread Paul Kirth via cfe-commits
@@ -1,12 +1,19 @@ function genLink(Ref) { var Path = `${window.location.protocol}//${window.location.host}/${Ref.Path}`; + var isFileProtocol = window.location.protocol.startsWith("file"); + // we treat the file paths different depending on if we're + // serving via a http

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-29 Thread Paul Kirth via cfe-commits
@@ -1,12 +1,19 @@ function genLink(Ref) { var Path = `${window.location.protocol}//${window.location.host}/${Ref.Path}`; + var isFileProtocol = window.location.protocol.startsWith("file"); + // we treat the file paths different depending on if we're + // serving via a http

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-29 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/93281 >From f5872e7c82d097ae3c141765d3f1d7e3d0b25b82 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 24 May 2024 04:28:08 -0400 Subject: [PATCH 1/4] clang-doc switched from using relative to absolute paths ---

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-29 Thread via cfe-commits
@@ -1,12 +1,19 @@ function genLink(Ref) { var Path = `${window.location.protocol}//${window.location.host}/${Ref.Path}`; + var isFileProtocol = window.location.protocol.startsWith("file"); + // we treat the file paths different depending on if we're + // serving via a http

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-30 Thread via cfe-commits
@@ -7,6 +7,7 @@ // RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Rectangle.html -check-prefix=HTML-RECTANGLE // RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Circle.html -check-prefix=HTML-CIRCLE +// JSON-INDEX: var RootPath = "{{.*}}"; Peter

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-30 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-30 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-30 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/93281 >From f5872e7c82d097ae3c141765d3f1d7e3d0b25b82 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 24 May 2024 04:28:08 -0400 Subject: [PATCH 1/5] clang-doc switched from using relative to absolute paths ---

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-30 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/93281 >From f5872e7c82d097ae3c141765d3f1d7e3d0b25b82 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 24 May 2024 04:28:08 -0400 Subject: [PATCH 1/6] clang-doc switched from using relative to absolute paths ---

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-30 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/93281 >From f5872e7c82d097ae3c141765d3f1d7e3d0b25b82 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 24 May 2024 04:28:08 -0400 Subject: [PATCH 1/7] clang-doc switched from using relative to absolute paths ---

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-30 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/93281 >From f5872e7c82d097ae3c141765d3f1d7e3d0b25b82 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 24 May 2024 04:28:08 -0400 Subject: [PATCH 1/8] clang-doc switched from using relative to absolute paths ---

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-30 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: rm -rf %t +// RUN: mkdir %t ilovepi wrote: nit: Can be one line w/ `&&` https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-30 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "CHECK: var RootPath = \"%t\";" > %t/check.txt +// RUN: cp "%s" "%t/test.cpp" ilovepi wrote: what is this doing? `CHECK` lines belong in the test file, generally. If you need to split them up som

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-30 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "CHECK: var RootPath = \"%t\";" > %t/check.txt +// RUN: cp "%s" "%t/test.cpp" +// RUN: clang-doc --doxygen --executor=standalone -p %t %t/test.cpp -output=%t/docs +// RUN: FileCheck %t/check.txt -input-file=%t/doc

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-30 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: cp "%s" "%t/test.cpp" +// RUN: clang-doc --doxygen --executor=standalone -p %t %t/test.cpp -output=../docs +// RUN: FileCheck %s -input-file=%t/docs/index_json.js +// RUN: rm -rf %t + +// CHECK: var RootPath = "{{.*}}.

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-30 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "CHECK: var RootPath = \"%/t/docs\";" > %t/check.txt +// RUN: cp "%s" "%t/test.cpp" ilovepi wrote: I see you're trying to work around the path inconsistency issues, but that's just an end-around

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-30 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "CHECK: var RootPath = \"%/t/docs\";" > %t/check.txt +// RUN: cp "%s" "%t/test.cpp" +// RUN: clang-doc --format=html --executor=standalone -p %t %t/test.cpp --output=%t/docs +// RUN: FileCheck %t/check.txt -input-

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-30 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "CHECK: var RootPath = \"%/t/docs\";" > %t/check.txt +// RUN: cp "%s" "%t/test.cpp" +// RUN: clang-doc --format=html --executor=standalone -p %t %t/test.cpp --output=%t/docs ilovepi wrote: ```sug

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-06-30 Thread Paul Kirth via cfe-commits
@@ -7,6 +7,7 @@ // RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Rectangle.html -check-prefix=HTML-RECTANGLE // RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Circle.html -check-prefix=HTML-CIRCLE +// JSON-INDEX: var RootPath = "{{.*}}"; ilove

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-07-09 Thread Paul Kirth via cfe-commits
ilovepi wrote: any progress here? https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-07-12 Thread via cfe-commits
PeterChou1 wrote: > any progress here? I wanted to merge the test cases prs so we could view the regressions from the tests https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang-tools-extra] clang-doc switched from using relative to absolute paths (PR #93281)

2024-05-24 Thread via cfe-commits
https://github.com/PeterChou1 created https://github.com/llvm/llvm-project/pull/93281 issue: https://github.com/llvm/llvm-project/issues/92867 I solved the problem by making the js use absolute path instead relative I think this also makes it more permanent since there is no need to compute r

[clang-tools-extra] clang-doc switched from using relative to absolute paths (PR #93281)

2024-05-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (PeterChou1) Changes issue: https://github.com/llvm/llvm-project/issues/92867 I solved the problem by making the js use absolute path instead relative I think this also makes it more permanent since there is no need to co

[clang-tools-extra] clang-doc switched from using relative to absolute paths (PR #93281)

2024-05-24 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/93281 >From f5872e7c82d097ae3c141765d3f1d7e3d0b25b82 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 24 May 2024 04:28:08 -0400 Subject: [PATCH 1/2] clang-doc switched from using relative to absolute paths ---

[clang-tools-extra] clang-doc switched from using relative to absolute paths (PR #93281)

2024-05-24 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/93281 >From f5872e7c82d097ae3c141765d3f1d7e3d0b25b82 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 24 May 2024 04:28:08 -0400 Subject: [PATCH 1/2] clang-doc switched from using relative to absolute paths --- clan

[clang-tools-extra] clang-doc switched from using relative to absolute paths (PR #93281)

2024-05-24 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] clang-doc switched from using relative to absolute paths (PR #93281)

2024-05-24 Thread Paul Kirth via cfe-commits
@@ -1,48 +1,22 @@ -// Append using posix-style a file name or directory to Base -function append(Base, New) { - if (!New) -return Base; - if (Base) -Base += "/"; - Base += New; - return Base; -} - -// Get relative path to access FilePath from CurrentDirectory -function

[clang-tools-extra] clang-doc switched from using relative to absolute paths (PR #93281)

2024-05-24 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi requested changes to this pull request. I'm not completely sure we want to use absolute paths, but since this mostly seems related to URLs and not file system paths, its probably fine. Please add some tests for this. It's preferable if we can pre-commit tests with th

[clang-tools-extra] clang-doc switched from using relative to absolute paths (PR #93281)

2024-05-24 Thread Paul Kirth via cfe-commits
@@ -1,48 +1,22 @@ -// Append using posix-style a file name or directory to Base -function append(Base, New) { - if (!New) -return Base; - if (Base) -Base += "/"; - Base += New; - return Base; -} - -// Get relative path to access FilePath from CurrentDirectory -function

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-05-24 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-07-24 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/93281 >From f3eec972f66576fdacc578eaea3f158efdf57128 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 24 May 2024 04:28:08 -0400 Subject: [PATCH 01/10] clang-doc switched from using relative to absolute paths

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-07-24 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/93281 >From f3eec972f66576fdacc578eaea3f158efdf57128 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 24 May 2024 04:28:08 -0400 Subject: [PATCH 01/11] clang-doc switched from using relative to absolute paths

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-07-24 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-07-24 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM, but can we improve the check for RootPath somehow? I feel like there should be something we can match there. https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-07-24 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: rm -rf %t && mkdir %t +// RUN: cp "%s" "%t/test.cpp" +// RUN: clang-doc --format=html --executor=standalone -p %s --output=%t +// RUN: FileCheck %s -input-file=%t/index_json.js -check-prefix=JSON-INDEX +// RUN: rm -rf %t + +// JSON-INDEX: var RootPath = "

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-07-24 Thread Paul Kirth via cfe-commits
ilovepi wrote: Hmm, seems like tests are failing. PTAL. https://github.com/llvm/llvm-project/pull/93281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-07-24 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/93281 >From f3eec972f66576fdacc578eaea3f158efdf57128 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 24 May 2024 04:28:08 -0400 Subject: [PATCH 01/12] clang-doc switched from using relative to absolute paths

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-07-24 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: rm -rf %t && mkdir %t +// RUN: cp "%s" "%t/test.cpp" ilovepi wrote: Looks like I missed this. Please don’t copy the test file around. To be blunt this pattern has been brought up in multiple PRs and even in previous incarnations of this

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-07-24 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/93281 >From f3eec972f66576fdacc578eaea3f158efdf57128 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 24 May 2024 04:28:08 -0400 Subject: [PATCH 01/13] clang-doc switched from using relative to absolute paths

[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)

2024-07-24 Thread via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: rm -rf %t && mkdir %t +// RUN: cp "%s" "%t/test.cpp" PeterChou1 wrote: Sorry, the reason why I kept using this pattern is because I copied the same test setups in the original test for clang-doc [here](https://github.com/llvm/llvm-proje