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

feat: support configurable main_pkg name #1231

Closed
wants to merge 2 commits into from

Conversation

He1pa
Copy link
Contributor

@He1pa He1pa commented Apr 19, 2024

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

  • N
  • Y

2. What is the scope of this PR (e.g. component or file name):

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

support configurable main_pkg name

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

@He1pa He1pa force-pushed the option_main_pkg_name branch from 216aaec to 4692ee5 Compare April 19, 2024 10:09
@He1pa He1pa force-pushed the option_main_pkg_name branch from 4692ee5 to 21fc215 Compare April 22, 2024 02:42
kclvm/ast/Cargo.toml Show resolved Hide resolved
pub const MAIN_PKG: &str = "__main__";
pub const MAIN_PKG_DEFAULT: &str = "__main__";

lazy_static! {
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure if this method is feasible, as during the compilation process, there can be two threads simultaneously, one thread modifying main_pkg and the other thread compiling simultaneously, which will achieve the expected results.

@coveralls
Copy link
Collaborator

coveralls commented Apr 22, 2024

Pull Request Test Coverage Report for Build 8777948997

Details

  • 53 of 63 (84.13%) changed or added relevant lines in 22 files are covered.
  • 14 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.02%) to 71.389%

Changes Missing Coverage Covered Lines Changed/Added Lines %
kclvm/query/src/override.rs 0 3 0.0%
kclvm/sema/src/core/symbol.rs 0 3 0.0%
kclvm/ast/src/lib.rs 3 7 42.86%
Files with Coverage Reduction New Missed Lines %
kclvm/tools/src/LSP/src/request.rs 1 72.02%
kclvm/ast/src/token.rs 1 58.9%
kclvm/sema/src/builtin/option.rs 1 0.0%
kclvm/config/src/settings.rs 4 78.26%
kclvm/ast/src/config.rs 7 0.0%
Totals Coverage Status
Change from base Build 8763607955: -0.02%
Covered Lines: 52622
Relevant Lines: 73712

💛 - Coveralls

@Peefy Peefy added lsp enhancement New feature or request labels Apr 23, 2024
@Peefy Peefy added this to the v0.9.0 Release milestone Apr 23, 2024
@He1pa He1pa closed this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lsp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants