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

No need to depend on EnsoContext when working with PackageRepository #7276

Merged
merged 2 commits into from
Jul 13, 2023

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Jul 13, 2023

Pull Request Description

On a quest to avoid dependencies on EnsoContext from Compiler. Step one. The ultimate goal is to move Compiler and all its IRPasses into a dedicated runtime/compiler module that could be used from #7054.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • All code follows the
    Scala and Java,
  • All code has been tested:
    • Unit tests continue to pass

@JaroslavTulach JaroslavTulach added the CI: No changelog needed Do not require a changelog entry for this PR. label Jul 13, 2023
@JaroslavTulach JaroslavTulach self-assigned this Jul 13, 2023
* @param file the module to find the package of
* @return {@code module}'s package, if exists
*/
public static Optional<Package<TruffleFile>> getPackageOf(
Copy link
Member Author

Choose a reason for hiding this comment

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

These two methods don't need any EnsoContext. They operate only on PackageRepository - moving them away as static ones into PackageRepositoryUtils class. Why a new class? Because the code was written in Java and PackageRepository is in Scala. I certainly don't want to rewrite existing Java code into Scala.

@JaroslavTulach JaroslavTulach added the CI: Ready to merge This PR is eligible for automatic merge label Jul 13, 2023
@JaroslavTulach
Copy link
Member Author

Probably random failure in RuntimeServerTest... live vs. design... restarted.

@Akirathan
Copy link
Member

Probably random failure in RuntimeServerTest... live vs. design... restarted.

I have seen this failure in the last few weeks as well.

@mergify mergify bot merged commit 372c2ee into develop Jul 13, 2023
28 of 29 checks passed
@mergify mergify bot deleted the wip/jtulach/LessEnsoContextDeps branch July 13, 2023 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants