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

Run whole test/Base_Tests with NI #10296

Merged
merged 58 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
29a0920
Try to run the whole test/Base_Tests
JaroslavTulach Jun 17, 2024
51bc321
Catch NI error
JaroslavTulach Jun 17, 2024
2aa81cd
Instance methods on Decoder and Encoder are being called
JaroslavTulach Jun 17, 2024
354808a
java.util.ArrayList is often used in tests - register it for reflection
JaroslavTulach Jun 17, 2024
20f9589
Allow access to instance methods of these classes
JaroslavTulach Jun 17, 2024
d636711
Need reflective access to AdjustOp nested class
JaroslavTulach Jun 17, 2024
c3a97c1
Need to call instance methods on LinearModel
JaroslavTulach Jun 17, 2024
d61e5d2
Need access to nested classes
JaroslavTulach Jun 17, 2024
dc38371
Put all extra files to Extra_Imports.enso
JaroslavTulach Jun 17, 2024
4a7a5df
locate enso_parser library even in ./runner mode
JaroslavTulach Jun 17, 2024
6efc514
Need to access message method
JaroslavTulach Jun 17, 2024
3f02060
Execute ./runner --run <selected file>
JaroslavTulach Jun 17, 2024
35ca49c
./runner must embed all locales
JaroslavTulach Jun 17, 2024
501c07d
Making sure more missing symbols is accesible
JaroslavTulach Jun 17, 2024
377bd2a
Replacing usage of asGuestObject in EnsoFile by own TruffleObject imp…
JaroslavTulach Jun 18, 2024
466f222
Support reading into a byte[]
JaroslavTulach Jun 18, 2024
a9cda6f
I/O needs to be hidden behind @TruffleBoundary
JaroslavTulach Jun 18, 2024
0d902b2
Cannot be loaded from "root"
JaroslavTulach Jun 18, 2024
31e3798
XML.from_file requires -1 at the end of the file
JaroslavTulach Jun 18, 2024
cae2521
Include jdk.localedata to make I18N available
JaroslavTulach Jun 18, 2024
30ce7c3
Less polyglot java imports in XML.enso
JaroslavTulach Jun 19, 2024
0695d1b
InputStreamLike interface to 'view' EnsoFile's 'java' stream as havin…
JaroslavTulach Jun 19, 2024
ec2ea1f
LocalDateTime and Function are used in Base_Tests
JaroslavTulach Jun 19, 2024
d03ba23
Add all Charsets
JaroslavTulach Jun 19, 2024
3e5e0b0
Don't need index to runEngineDistribution
JaroslavTulach Jun 20, 2024
3c52ea7
Let the Stream_Utils handle asInputStream conversion
JaroslavTulach Jun 20, 2024
07e7770
Additional imports
JaroslavTulach Jun 20, 2024
d59f6f7
Introducing File_Utils to encapsulate matcher
JaroslavTulach Jun 20, 2024
9f4569a
Avoid Python None check when Python is missing
JaroslavTulach Jun 20, 2024
b9d221f
asOutputStream wrapper
JaroslavTulach Jun 20, 2024
5328f66
Need to support available() to make Reporting_Stream_Decoder_Spec suc…
JaroslavTulach Jun 20, 2024
ec0918f
Register OutputStreamLike for reflection
JaroslavTulach Jun 20, 2024
c2f9eb5
Make HttpClient.Builder ready for reflective access
JaroslavTulach Jun 20, 2024
04bfdcd
Survive when js_exception (provided via asGuestValue) doesn't have th…
JaroslavTulach Jun 20, 2024
6ab352e
Rather call static method than Predicate.test
JaroslavTulach Jun 20, 2024
961c3ec
When XML_Document.Value is private, allocate with factory method
JaroslavTulach Jun 20, 2024
7d73811
Include org.enso.base_test_helpers on classpath when building native …
JaroslavTulach Jun 20, 2024
b222ed0
Another place to asOutputStream
JaroslavTulach Jun 20, 2024
e819e74
Calling overloaded Path.of has some issues. Use File_Utils wrapper
JaroslavTulach Jun 20, 2024
fc24808
Few more extra imports
JaroslavTulach Jun 20, 2024
0dec33e
Regenerated SubstrateVM metadata with:
JaroslavTulach Jun 20, 2024
41ef406
Search from cwd is important for development setup
JaroslavTulach Jun 20, 2024
582f3be
Relaxing the test as NI cannot provide location of the error (yet)
JaroslavTulach Jun 20, 2024
403e0d6
HttpClient.Version is being access
JaroslavTulach Jun 20, 2024
cc14d91
Manual tweaks to reflect-config.json file
JaroslavTulach Jun 20, 2024
34424ae
Have to absolutize the file path
JaroslavTulach Jun 20, 2024
71cfc0d
Avoid asGuestValue in EnsoProjectNode
JaroslavTulach Jun 20, 2024
2b9be62
Need to read statusCode from EnsoHttpResponse
JaroslavTulach Jun 20, 2024
a1bff6e
Test is accessing IntHolder value and boxed fields
JaroslavTulach Jun 20, 2024
4c2089f
Merging with develop
JaroslavTulach Jun 20, 2024
c4fb3db
Re-adding @Tail_Call as #9251 is fixed
JaroslavTulach Jun 20, 2024
31a3de8
test/Base_Tests shall be executed with assertions enabled
JaroslavTulach Jun 20, 2024
b2caa90
HTTP Response is using a lot of Java classes
JaroslavTulach Jun 20, 2024
1bae374
polyglot java import JsonLocation to be able to extract line and colu…
JaroslavTulach Jun 20, 2024
562e611
Factorial sample program is no longer needed
JaroslavTulach Jun 20, 2024
b8b4aae
Removing unused variables
JaroslavTulach Jun 20, 2024
8d0684c
Including Input_Stream_Spec in the Base_Tests
JaroslavTulach Jun 20, 2024
bfa60b4
Testing InputStreamLike with and without available member
JaroslavTulach Jun 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/build/src/engine/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ pub async fn runner_sanity_test(
);
if enso_java.is_none() {
let test_base = Command::new(&repo_root.runner)
.args(["--run", repo_root.test.join("Base_Tests").as_str(), "^Text"])
.args(["--run", repo_root.test.join("Base_Tests").as_str()])
JaroslavTulach marked this conversation as resolved.
Show resolved Hide resolved
.set_env_opt(ENSO_JAVA, enso_java)?
.set_env(ENSO_DATA_DIRECTORY, engine_package)?
.run_stdout()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import project.Errors.Encoding_Error.Encoding_Error
from project.Data.Text.Extensions import all

polyglot java import java.util.Base64
polyglot java import java.util.Base64.Decoder
polyglot java import java.util.Base64.Encoder

## A helper utility for handling base64 encoding.
type Base_64
Expand Down
3 changes: 3 additions & 0 deletions distribution/lib/Standard/Base/0.0.0-dev/src/Data/XML.enso
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ polyglot java import java.io.StringReader
polyglot java import java.lang.Exception as JException
polyglot java import javax.xml.parsers.DocumentBuilder
polyglot java import javax.xml.parsers.DocumentBuilderFactory
JaroslavTulach marked this conversation as resolved.
Show resolved Hide resolved
polyglot java import javax.xml.xpath.XPath
polyglot java import javax.xml.xpath.XPathConstants
polyglot java import javax.xml.xpath.XPathFactory
polyglot java import org.enso.base.XML_Utils
polyglot java import org.w3c.dom.Attr
polyglot java import org.w3c.dom.Document
polyglot java import org.w3c.dom.Element
polyglot java import org.w3c.dom.Node
polyglot java import org.w3c.dom.NodeList
polyglot java import org.w3c.dom.NamedNodeMap
polyglot java import org.w3c.dom.Text as Java_Text
polyglot java import org.xml.sax.InputSource
polyglot java import org.xml.sax.SAXException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ from project.Data.Index_Sub_Range import drop_helper, Index_Sub_Range, take_help
from project.Data.Ordering import Comparable
from project.Data.Range.Extensions import all

# often used in tests
JaroslavTulach marked this conversation as resolved.
Show resolved Hide resolved
polyglot java import java.util.ArrayList

new_array_proxy_builtin : Integer -> (Integer -> Any) -> Array
new_array_proxy_builtin length at = @Builtin_Method "Array_Like_Helpers.new_array_proxy_builtin"

Expand Down Expand Up @@ -78,7 +81,7 @@ slice vector start end = @Builtin_Method "Array_Like_Helpers.slice"
`Map_Error`.
- No_Wrap: The first error is thrown, and is not wrapped in
`Map_Error`.
- Report_Warning: The result for that element is `Nothing`,
- Report_Warning: The result for that element is `Nothing`,
the error is attached as a warning. Currently unimplemented.
- Ignore: The result is `Nothing`, and the error is
ignored.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,17 @@ public static PolyglotCallType getPolyglotCallType(
return PolyglotCallType.CONVERT_TO_HASH_MAP;
}

String methodName = symbol.getName();
if (library.isMemberInvocable(self, methodName)) {
return PolyglotCallType.CALL_METHOD;
} else if (library.isMemberReadable(self, methodName)) {
return PolyglotCallType.GET_MEMBER;
} else if (library.isInstantiable(self) && methodName.equals(NEW_NAME)) {
return PolyglotCallType.INSTANTIATE;
try {
String methodName = symbol.getName();
if (library.isMemberInvocable(self, methodName)) {
return PolyglotCallType.CALL_METHOD;
} else if (library.isMemberReadable(self, methodName)) {
return PolyglotCallType.GET_MEMBER;
} else if (library.isInstantiable(self) && methodName.equals(NEW_NAME)) {
return PolyglotCallType.INSTANTIATE;
}
} catch (TypeNotPresentException ex) {
// no call, get or instantiate is possible
}
return PolyglotCallType.NOT_SUPPORTED;
}
Expand Down
Loading