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

Rename LFortran namespace to LCompilers #534

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Thirumalai-Shaktivel
Copy link
Collaborator

@Thirumalai-Shaktivel Thirumalai-Shaktivel commented May 28, 2022

Closes: #403
Related: #560

@certik
Copy link
Contributor

certik commented May 29, 2022

Let's first sync libasr with LFortran / LPython, then do this change in both projects at once, otherwise it will be quite hard to sync.

@Thirumalai-Shaktivel
Copy link
Collaborator Author

$ ctest 
Test project /home/thirumalai/Open_Source/lpython
    Start 1: test_stacktrace
1/2 Test #1: test_stacktrace ..................   Passed    0.92 sec
    Start 2: test_lpython
2/2 Test #2: test_lpython .....................***Failed    0.15 sec

50% tests passed, 1 tests failed out of 2

Total Test time (real) =   1.08 sec

The following tests FAILED:
          2 - test_lpython (Failed)
Errors while running CTest
Output from these tests are in: /home/thirumalai/Open_Source/lpython/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.

@certik, How to resolve this error?

@certik
Copy link
Contributor

certik commented Jun 4, 2022

You have to see what the error is by executing ./src/lpython/test_lpython.

@Thirumalai-Shaktivel
Copy link
Collaborator Author

$ ./src/lpython/tests/test_lpython 
[doctest] doctest version is "2.4.8"
[doctest] run with "--help" for options
===============================================================================
/home/thirumalai/Open_Source/lpython/src/lpython/tests/test_error_rendering.cpp:59:
TEST CASE:  Error Render: primary/secondary labels, single line

/home/thirumalai/Open_Source/lpython/src/lpython/tests/test_error_rendering.cpp:94: ERROR: CHECK( out == ref ) is NOT correct!
  values: CHECK( semantic error: Error with label no message
 --> input:1:5
  |
1 | One line text
  |     ^^^^ 
 == semantic error: Error with label no message
 --> input:1:5
  |
1 | One line text
  |     ^^^^
 )

===============================================================================
[doctest] test cases:  37 |  36 passed | 1 failed | 0 skipped
[doctest] assertions: 210 | 209 passed | 1 failed |
[doctest] Status: FAILURE!

Both the strings seems similar!

@certik
Copy link
Contributor

certik commented Jun 4, 2022

Is there an extra ) at the end?

@Thirumalai-Shaktivel
Copy link
Collaborator Author

Thirumalai-Shaktivel commented Jun 5, 2022

I think the extra ) is the closing paren for CHECK (

@certik
Copy link
Contributor

certik commented Jun 5, 2022

Is this on Windows? I wonder if it is some CR / LF issue.

@Thirumalai-Shaktivel
Copy link
Collaborator Author

Thirumalai-Shaktivel commented Jun 5, 2022

Nah. It fails on Linux! Yup, It might be CR / LF issue.

@certik
Copy link
Contributor

certik commented Jun 5, 2022

It's in the file src/lpython/tests/CMakeLists.txt, you can try to debug it.

However, I would recommend to split this into smaller changes and just get one smaller change at a time. And make sure to submit a PR both to LPython and LFortran, so that we can keep the libasr synchronized.

@Thirumalai-Shaktivel Thirumalai-Shaktivel marked this pull request as draft October 5, 2022 03:46
@Thirumalai-Shaktivel Thirumalai-Shaktivel added the ready for review PRs that are ready for review label Nov 16, 2022
@Thirumalai-Shaktivel
Copy link
Collaborator Author

If anything else to be modified, do let me know.

@certik
Copy link
Contributor

certik commented Nov 16, 2022

We need to sync ASR first, otherwise it will be a lot of work I think.

@Thirumalai-Shaktivel
Copy link
Collaborator Author

This PR is ready!
I think the only left-out part in LIBASR is lfortran_intrinsics

@certik
Copy link
Contributor

certik commented Nov 20, 2022

Yes, we should do it, but we need to do this both in LFortran and LPython at the same time.

@Thirumalai-Shaktivel
Copy link
Collaborator Author

Cool, I will submit a PR with same changes there.

LCompilers in libasr
LCompilers::LPython in Tokenizer, Parser, Python_AST_to_ASR, ...
!2 = !{}
!3 = distinct !DISubprogram(name: "_lpython_main_program", scope: !1, file: !1, line: 1, type: !4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
!4 = !DISubroutineType(types: !5)
!5 = !{null}
!6 = !DILocation(line: 9, column: 1, scope: !3)
!7 = distinct !DISubprogram(name: "main0", scope: !1, file: !1, line: 1, type: !4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
!2 = distinct !DISubprogram(name: "_lpython_main_program", scope: !1, file: !1, line: 1, type: !3, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !5)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These changes are made using LLVM 15. But, CI uses LLVM 11. So, the failure.

@Thirumalai-Shaktivel
Copy link
Collaborator Author

@certik, This PR is ready for final review.

@Thirumalai-Shaktivel
Copy link
Collaborator Author

I'm spitting this PR into different PR's.
Starting with LFortran Assert

@Thirumalai-Shaktivel Thirumalai-Shaktivel marked this pull request as draft December 2, 2022 02:49
@Thirumalai-Shaktivel Thirumalai-Shaktivel removed the ready for review PRs that are ready for review label Dec 28, 2022
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.

Changing the namespace in LPython and LFortran
2 participants