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

Refactoring getFileLocation to be static CMakeBuilder method #39

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

amitrahman1026
Copy link
Contributor

Addressing #35
Updated regex in getFileLocation as well
Tested out some scenarios, but edge case of filename containing ":" still exist, maybe I could get some help with that 😅
image

Copy link
Contributor

@lingyuncai lingyuncai left a comment

Choose a reason for hiding this comment

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

Hi @amitrahman1026, thanks for the contribution!

The refactor part LGTM.

For the regex in getFileLocation, another example is as below and we could want a scan starting from the last line to get CMakeLists.txt from CMakeLists.txt:15 (find_package), which doesn't have the CMake Error at prefix.

CMake Error at /usr/share/test.cmake:137 (message):
  Some message here.
Call Stack (most recent call first):
  /usr/share/test.cmake:378 (FAILURE_MESSAGE)
  cmake/another_test.cmake:71 (find_package_handle_standard_args)
  CMakeLists.txt:15 (find_package)

@amitrahman1026
Copy link
Contributor Author

amitrahman1026 commented Nov 9, 2023

Addressing multi-line block detection (#34) by adding detection for closing comment
Updated the regex to have (?:CMake Error at \/) as a matching group instead, so it should work even without prefix

image

src/builders/cmake.ts Outdated Show resolved Hide resolved
src/builders/cmake.ts Outdated Show resolved Hide resolved
src/advisors/cpp_exception.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@lingyuncai lingyuncai left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @amitrahman1026

@lingyuncai lingyuncai merged commit 2699096 into web-devkits:main Nov 9, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants