-
Notifications
You must be signed in to change notification settings - Fork 326
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
Hide non-exported stuff from other libraries #6905
Conversation
ed0ec62
to
42118ac
Compare
engine/runtime/src/test/java/org/enso/interpreter/test/ValuesGenerator.java
Show resolved
Hide resolved
With additional tweaks of import and export in standard library done in dfd116a the following command passes OK: sbt:enso> runEngineDistribution --run test/Tests
1863 tests succeeded.
0 tests failed.
21 tests skipped. |
3fbf872
to
e8ef79d
Compare
We have following failures: |
…olvedSymbol<up_to>
There was 14 FAILED tests in
Let's see what's the status after deab523 |
This draft PR proof of concept is green. However its core - the ImportAPIAnalysis pass is a "throw away". The general preference seems to be a private
## This adds two numbers
private
add a b = a + b or private
## This adds two numbers
private add a b = a + b To implement the |
Goal
This is a proof of concept prototype for improvements in import/export encapsulation. It has following goals:
import Namespace.Name
should use onlyMain
and its re-exportsimport project.some.Item
should always use physical paths inside of the same project/packageThe Plan
A new test is written to check that non-rexported type
Impl
isn't available for other libraries.Additional compiler pass ImportApiAnalysis is created that verifies the "logical imports". If there is a
Namespace.Name.Main
in a package, then only modules (transitively) exported viaMain
are allowed. For others an IR.Error.ImportExport is inserted into theIR
.With dfd116a the following is working:
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
style guides.