From b07103dcf8432aa515fcd004f3d98913952c29c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Wed, 14 Aug 2024 23:04:10 +0200 Subject: [PATCH 01/12] fix Rust compilation in VS Code --- .vscode/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 0baf6fa290ca..fc29644afc98 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "rust-analyzer.linkedProjects": [ - "./app/gui2/rust-ffi/Cargo.toml" + "./app/rust-ffi/Cargo.toml" ], "vue.complete.casing.status": false, "vue.complete.casing.props": "camel", From a6f83e9e70bee63fc4b9ff06881c4efaca9f8192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Wed, 14 Aug 2024 23:19:32 +0200 Subject: [PATCH 02/12] report test failures to GH Actions --- .../Standard/Test/0.0.0-dev/src/Test_Reporter.enso | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso b/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso index 732b4d283351..c8d962348b77 100644 --- a/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso +++ b/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso @@ -76,6 +76,7 @@ print_single_result (test_result : Test_Result) (config : Suite_Config) = txt = " - " + test_result.spec_name + " " + times_suffix IO.println (maybe_green_text txt config) Spec_Result.Failure msg details -> + report_github_error_message test_result.spec_name msg IO.println "" txt = " - [FAILED] " + test_result.spec_name + " " + times_suffix IO.println (maybe_red_text txt config) @@ -87,6 +88,18 @@ print_single_result (test_result : Test_Result) (config : Suite_Config) = IO.println (maybe_grey_text (" - [PENDING] " + test_result.spec_name) config) IO.println (" Reason: " + reason) +## PRIVATE + Reports an error message to show up as a note in GitHub Actions, + only if running in the GitHub Actions environment. +report_github_error_message (title : Text) (message : Text) = + is_enabled = Environment.get "GITHUB_ACTIONS" == "true" + sanitize text = + lines = text.lines + suffix = if lines.length > 1 then " (... and " + (lines.length - 1).to_text + " more lines)" else "" + lines.first + suffix + if is_enabled then + safe_title = (sanitize title).replace "," ";" + IO.println "::error title="+safe_title+"::"+(sanitize message) ## Prints all the results, optionally writing them to a jUnit XML output. From fc1b474e18a0fee2747ea1ed993f2a0ec44ff260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Wed, 14 Aug 2024 23:19:40 +0200 Subject: [PATCH 03/12] break some tests to test it --- test/Base_Tests/src/Data/Text_Spec.enso | 2 +- test/Base_Tests/src/Data/Vector_Spec.enso | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Base_Tests/src/Data/Text_Spec.enso b/test/Base_Tests/src/Data/Text_Spec.enso index 1728896293ef..b02afd343683 100644 --- a/test/Base_Tests/src/Data/Text_Spec.enso +++ b/test/Base_Tests/src/Data/Text_Spec.enso @@ -71,7 +71,7 @@ add_specs suite_builder = sentence_words = ['I', 'have', 'a', 'very', 'long', 'block', 'of', 'text', ',', 'here', '.', 'It', 'goes', 'on', 'and', 'on', ',', 'containing', 'things', 'like', 'decimal', 'points', '(', '1.0314e3', ')', 'and', 'other', 'language', 'scripts', 'as', 'well', '건반', '(', 'Korean', ')', '.'] group_builder.specify "should allow naive length computation over grapheme clusters" <| - kshi.length . should_equal 1 + kshi.length . should_equal 10015500005345 facepalm.length . should_equal 1 group_builder.specify "should be able to tell if Text is normalized" <| diff --git a/test/Base_Tests/src/Data/Vector_Spec.enso b/test/Base_Tests/src/Data/Vector_Spec.enso index bd32795c79e4..53325ae50a8c 100644 --- a/test/Base_Tests/src/Data/Vector_Spec.enso +++ b/test/Base_Tests/src/Data/Vector_Spec.enso @@ -83,7 +83,7 @@ type_spec suite_builder name alter = suite_builder.group name group_builder-> "Can't run Python tests, Python is not installed." group_builder.specify "text bytes" <| - "Lore".utf_8 . should_equal [76, 111, 114, 101] + "Lore".utf_8 . should_equal [] group_builder.specify "should allow vector creation with a programmatic constructor" <| Vector.new 100 (ix -> ix + 1) . fold 0 (+) . should_equal 5050 From fd7d421452f751fc7e68737c9efb466bbede2459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Wed, 14 Aug 2024 23:36:22 +0200 Subject: [PATCH 04/12] TODO --- distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso | 1 + 1 file changed, 1 insertion(+) diff --git a/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso b/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso index c8d962348b77..737d1bc2f2b5 100644 --- a/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso +++ b/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso @@ -93,6 +93,7 @@ print_single_result (test_result : Test_Result) (config : Suite_Config) = only if running in the GitHub Actions environment. report_github_error_message (title : Text) (message : Text) = is_enabled = Environment.get "GITHUB_ACTIONS" == "true" + # TODO message contains e.g. (at X:\NBO\enso\test\Base_Tests\src\Data\Text_Spec.enso:74:13-53) we can extract location from this sanitize text = lines = text.lines suffix = if lines.length > 1 then " (... and " + (lines.length - 1).to_text + " more lines)" else "" From d058988bb50c696a6796357b7b5780210ad4fdcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Wed, 14 Aug 2024 23:36:33 +0200 Subject: [PATCH 05/12] PoC: grouping in CI --- build/build/src/engine/context.rs | 12 ++++++++++-- build/build/src/enso.rs | 7 +++++-- build/build/src/rust/parser.rs | 7 ++++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/build/build/src/engine/context.rs b/build/build/src/engine/context.rs index 61d3c104240c..2a73734637ff 100644 --- a/build/build/src/engine/context.rs +++ b/build/build/src/engine/context.rs @@ -107,6 +107,7 @@ impl RunContext { /// environment variables for the build to follow. #[instrument(skip(self))] pub async fn prepare_build_env(&self) -> Result { + println!("::group::Preparing Build Environment"); // Building native images with Graal on Windows requires Microsoft Visual C++ Build Tools // available in the environment. If it is not visible, we need to add it. if TARGET_OS == OS::Windows && ide_ci::programs::vs::Cl.lookup().is_err() { @@ -191,6 +192,8 @@ impl RunContext { ide_ci::programs::graalpy::GraalPy.require_present().await?; prepare_simple_library_server.await??; + + println!("::endgroup::"); Ok(()) } @@ -334,12 +337,14 @@ impl RunContext { } if !tasks.is_empty() { + println!("::group::Building distributions and native images") debug!("Building distributions and native images."); if crate::ci::big_memory_machine() { sbt.call_arg(Sbt::concurrent_tasks(tasks)).await?; } else { sbt.call_arg(Sbt::sequential_tasks(tasks)).await?; } + println!("::endgroup::") } // === End of Build project-manager distribution and native image === @@ -377,15 +382,18 @@ impl RunContext { // We store Scala test result but not immediately fail on it, as we want to run all the // tests (including standard library ones) even if Scala tests fail. let scala_test_result = if self.config.test_jvm { + println!("::group::Running Scala Tests"); // Make sure that `sbt buildEngineDistributionNoIndex` is run before // `project-manager/test`. Note that we do not have to run // `buildEngineDistribution` (with indexing), because it is unnecessary. sbt.call_arg("buildEngineDistributionNoIndex").await?; // Run unit tests - sbt.call_arg("set Global / parallelExecution := false; test").await.inspect_err(|e| { + let result = sbt.call_arg("set Global / parallelExecution := false; test").await.inspect_err(|e| { ide_ci::actions::workflow::error(format!("Scala Tests failed: {e:?}")) - }) + }); + println!("::endgroup::"); + result } else { // No tests - no fail. Ok(()) diff --git a/build/build/src/enso.rs b/build/build/src/enso.rs index be25805be2f1..03ea91c4c6ad 100644 --- a/build/build/src/enso.rs +++ b/build/build/src/enso.rs @@ -126,6 +126,7 @@ impl BuiltEnso { async_policy: AsyncPolicy, test_selection: StandardLibraryTestsSelection, ) -> Result { + println!("::group::Running standard library tests"); let paths = &self.paths; // Environment for meta-tests. See: // https://github.com/enso-org/enso/tree/develop/test/Meta_Test_Suite_Tests @@ -220,7 +221,7 @@ impl BuiltEnso { // should be handled, e.g. avoiding port collisions. let results = ide_ci::future::join_all(futures, async_policy).await; let errors = results.into_iter().filter_map(Result::err).collect::>(); - if errors.is_empty() { + let final_result = if errors.is_empty() { Ok(()) } else { error!("{} test suit(s) failed.", errors.len()); @@ -228,7 +229,9 @@ impl BuiltEnso { error!("{}", error); } bail!("Standard library tests failed. Details: {:?}.", errors); - } + }; + println!("::endgroup::"); + final_result } } diff --git a/build/build/src/rust/parser.rs b/build/build/src/rust/parser.rs index 76b3041baeb1..e18e385b7007 100644 --- a/build/build/src/rust/parser.rs +++ b/build/build/src/rust/parser.rs @@ -42,12 +42,16 @@ pub async fn generate_java_to(repo_root: &Path, output_path: &Path) -> Result { } pub async fn generate_java(repo_root: &RepoRoot) -> Result { + println!("::group::Generating Java code for the parser bindings"); let output_path = repo_root.target.generated_java.join_iter(GENERATED_CODE_NAMESPACE); - generate_java_to(repo_root, &output_path).await + let result = generate_java_to(repo_root, &output_path).await; + println!("::endgroup::"); + result } #[context("Running self-tests for the generated Java sources failed.")] pub async fn run_self_tests(repo_root: &RepoRoot) -> Result { + println!("::group::Self-tests for the generated Java parser sources"); let base = &repo_root.target.generated_java; let lib = &repo_root.lib.rust.parser.generate_java.java; let package = repo_root.target.generated_java.join_iter(GENERATED_CODE_NAMESPACE); @@ -71,5 +75,6 @@ pub async fn run_self_tests(repo_root: &RepoRoot) -> Result { Java.cmd()?.apply(&java::Classpath::new([&base])).arg(&test_class).run_ok().await?; + println!("::endgroup::"); Ok(()) } From 9ea01c7323a904a0aed6b396ea53ba79d9de5e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Wed, 14 Aug 2024 23:48:47 +0200 Subject: [PATCH 06/12] PoC: summarize failed tests as annotation --- build/build/src/enso.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/build/src/enso.rs b/build/build/src/enso.rs index 03ea91c4c6ad..47c340053656 100644 --- a/build/build/src/enso.rs +++ b/build/build/src/enso.rs @@ -224,7 +224,9 @@ impl BuiltEnso { let final_result = if errors.is_empty() { Ok(()) } else { - error!("{} test suit(s) failed.", errors.len()); + let summary = errors.as_slice().iter().map(|e| e.to_string()).collect::>().join(", "); + println!("::error title=Failed Standard Library Tests::{} test suite(s) failed: {}", errors.len(), summary); + error!("{} test suite(s) failed.", errors.len()); for error in &errors { error!("{}", error); } From 858937797e6f076f1e6dca2e9d8e6d5a7e139535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Wed, 14 Aug 2024 23:49:09 +0200 Subject: [PATCH 07/12] PoC: preserve output from tests without prefix to allow for annotations (and also make the output more readable...) --- build/build/src/enso.rs | 2 +- build/ci_utils/src/program/command.rs | 45 +++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/build/build/src/enso.rs b/build/build/src/enso.rs index 47c340053656..7f3bfad6ae69 100644 --- a/build/build/src/enso.rs +++ b/build/build/src/enso.rs @@ -213,7 +213,7 @@ impl BuiltEnso { let futures = std_tests.into_iter().map(|test_path| { let command = self.run_test(test_path, ir_caches); - async move { command?.run_ok().await } + async move { command?.run_ok_preserve_stdout().await } }); // We need to join all the test tasks here, as they require postgres and httpbin alive. diff --git a/build/ci_utils/src/program/command.rs b/build/ci_utils/src/program/command.rs index 878873b85e7c..2bf882df37f6 100644 --- a/build/ci_utils/src/program/command.rs +++ b/build/ci_utils/src/program/command.rs @@ -353,6 +353,51 @@ impl Command { .boxed() } + // FIXME DRY! + pub fn spawn_intercepting_stderr(&mut self) -> Result { + self.stdout(Stdio::inherit()); + self.stderr(Stdio::piped()); + + let program = self.pretty_name.clone().unwrap_or_else(|| { + let program = self.inner.as_std().get_program(); + let program = Path::new(program).file_stem().unwrap_or_default().to_os_string(); + program.to_string_lossy().to_string() + }); + + let mut child = self.spawn()?; + + // FIXME unwraps + //spawn_log_processor("".into(), child.stdout.take().unwrap()); + spawn_log_processor(format!("{program} ⚠️"), child.stderr.take().unwrap()); + Ok(child) + } + + // FIXME DRY! + pub fn run_ok_preserve_stdout(&mut self) -> BoxFuture<'static, Result<()>> { + let pretty = self.describe(); + let span = info_span!( + "Running process.", + status = field::Empty, + pid = field::Empty, + command = field::Empty, + ) + .entered(); + let child = self.spawn_intercepting_stderr(); + let status_checker = self.status_checker.clone(); + async move { + let mut child = child?; + let status = child + .wait() + .inspect_ok(|exit_status| { + tracing::Span::current().record("status", exit_status.code()); + }) + .await?; + status_checker(status).context(format!("Command failed: {pretty}")) + } + .instrument(span.exit()) + .boxed() + } + pub fn output_ok(&mut self) -> BoxFuture<'static, Result> { let pretty = self.describe(); let span = info_span!( From 308aad61e73ae4f28d506796ace634b76c5cb82f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Wed, 14 Aug 2024 23:50:27 +0200 Subject: [PATCH 08/12] fix a typo... --- build/build/src/engine/context.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build/src/engine/context.rs b/build/build/src/engine/context.rs index 2a73734637ff..6a19000e2f3d 100644 --- a/build/build/src/engine/context.rs +++ b/build/build/src/engine/context.rs @@ -337,7 +337,7 @@ impl RunContext { } if !tasks.is_empty() { - println!("::group::Building distributions and native images") + println!("::group::Building distributions and native images"); debug!("Building distributions and native images."); if crate::ci::big_memory_machine() { sbt.call_arg(Sbt::concurrent_tasks(tasks)).await?; From 7200be8542fb3abe543ef8f339c07ebb1b423154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Fri, 16 Aug 2024 12:12:34 +0200 Subject: [PATCH 09/12] revert message groups --- build/build/src/engine/context.rs | 11 ++--------- build/build/src/enso.rs | 7 ++----- build/build/src/rust/parser.rs | 7 +------ 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/build/build/src/engine/context.rs b/build/build/src/engine/context.rs index 6a19000e2f3d..0c75ae1969cc 100644 --- a/build/build/src/engine/context.rs +++ b/build/build/src/engine/context.rs @@ -107,7 +107,6 @@ impl RunContext { /// environment variables for the build to follow. #[instrument(skip(self))] pub async fn prepare_build_env(&self) -> Result { - println!("::group::Preparing Build Environment"); // Building native images with Graal on Windows requires Microsoft Visual C++ Build Tools // available in the environment. If it is not visible, we need to add it. if TARGET_OS == OS::Windows && ide_ci::programs::vs::Cl.lookup().is_err() { @@ -193,7 +192,6 @@ impl RunContext { prepare_simple_library_server.await??; - println!("::endgroup::"); Ok(()) } @@ -337,14 +335,12 @@ impl RunContext { } if !tasks.is_empty() { - println!("::group::Building distributions and native images"); debug!("Building distributions and native images."); if crate::ci::big_memory_machine() { sbt.call_arg(Sbt::concurrent_tasks(tasks)).await?; } else { sbt.call_arg(Sbt::sequential_tasks(tasks)).await?; } - println!("::endgroup::") } // === End of Build project-manager distribution and native image === @@ -382,18 +378,15 @@ impl RunContext { // We store Scala test result but not immediately fail on it, as we want to run all the // tests (including standard library ones) even if Scala tests fail. let scala_test_result = if self.config.test_jvm { - println!("::group::Running Scala Tests"); // Make sure that `sbt buildEngineDistributionNoIndex` is run before // `project-manager/test`. Note that we do not have to run // `buildEngineDistribution` (with indexing), because it is unnecessary. sbt.call_arg("buildEngineDistributionNoIndex").await?; // Run unit tests - let result = sbt.call_arg("set Global / parallelExecution := false; test").await.inspect_err(|e| { + sbt.call_arg("set Global / parallelExecution := false; test").await.inspect_err(|e| { ide_ci::actions::workflow::error(format!("Scala Tests failed: {e:?}")) - }); - println!("::endgroup::"); - result + }) } else { // No tests - no fail. Ok(()) diff --git a/build/build/src/enso.rs b/build/build/src/enso.rs index 7f3bfad6ae69..db66e63568ea 100644 --- a/build/build/src/enso.rs +++ b/build/build/src/enso.rs @@ -126,7 +126,6 @@ impl BuiltEnso { async_policy: AsyncPolicy, test_selection: StandardLibraryTestsSelection, ) -> Result { - println!("::group::Running standard library tests"); let paths = &self.paths; // Environment for meta-tests. See: // https://github.com/enso-org/enso/tree/develop/test/Meta_Test_Suite_Tests @@ -221,7 +220,7 @@ impl BuiltEnso { // should be handled, e.g. avoiding port collisions. let results = ide_ci::future::join_all(futures, async_policy).await; let errors = results.into_iter().filter_map(Result::err).collect::>(); - let final_result = if errors.is_empty() { + if errors.is_empty() { Ok(()) } else { let summary = errors.as_slice().iter().map(|e| e.to_string()).collect::>().join(", "); @@ -231,9 +230,7 @@ impl BuiltEnso { error!("{}", error); } bail!("Standard library tests failed. Details: {:?}.", errors); - }; - println!("::endgroup::"); - final_result + } } } diff --git a/build/build/src/rust/parser.rs b/build/build/src/rust/parser.rs index e18e385b7007..76b3041baeb1 100644 --- a/build/build/src/rust/parser.rs +++ b/build/build/src/rust/parser.rs @@ -42,16 +42,12 @@ pub async fn generate_java_to(repo_root: &Path, output_path: &Path) -> Result { } pub async fn generate_java(repo_root: &RepoRoot) -> Result { - println!("::group::Generating Java code for the parser bindings"); let output_path = repo_root.target.generated_java.join_iter(GENERATED_CODE_NAMESPACE); - let result = generate_java_to(repo_root, &output_path).await; - println!("::endgroup::"); - result + generate_java_to(repo_root, &output_path).await } #[context("Running self-tests for the generated Java sources failed.")] pub async fn run_self_tests(repo_root: &RepoRoot) -> Result { - println!("::group::Self-tests for the generated Java parser sources"); let base = &repo_root.target.generated_java; let lib = &repo_root.lib.rust.parser.generate_java.java; let package = repo_root.target.generated_java.join_iter(GENERATED_CODE_NAMESPACE); @@ -75,6 +71,5 @@ pub async fn run_self_tests(repo_root: &RepoRoot) -> Result { Java.cmd()?.apply(&java::Classpath::new([&base])).arg(&test_class).run_ok().await?; - println!("::endgroup::"); Ok(()) } From 205342508f86772cf9fad518469c8ceff05c13cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Fri, 16 Aug 2024 13:20:45 +0200 Subject: [PATCH 10/12] WIP --- .../Test/0.0.0-dev/src/Test_Reporter.enso | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso b/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso index 737d1bc2f2b5..9b0f885d4a6c 100644 --- a/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso +++ b/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso @@ -93,14 +93,20 @@ print_single_result (test_result : Test_Result) (config : Suite_Config) = only if running in the GitHub Actions environment. report_github_error_message (title : Text) (message : Text) = is_enabled = Environment.get "GITHUB_ACTIONS" == "true" - # TODO message contains e.g. (at X:\NBO\enso\test\Base_Tests\src\Data\Text_Spec.enso:74:13-53) we can extract location from this - sanitize text = - lines = text.lines - suffix = if lines.length > 1 then " (... and " + (lines.length - 1).to_text + " more lines)" else "" - lines.first + suffix + sanitize_message txt = txt.replace '\n' '%0A' + sanitize_parameter txt = txt . replace '\n' '%0A' . replace ',' '%2C' if is_enabled then - safe_title = (sanitize title).replace "," ";" - IO.println "::error title="+safe_title+"::"+(sanitize message) + location_match = Regex.compile "at ((?:[A-Za-z]:)?[^:]+):([0-9]+):" . match message + location_part = if location_match.is_nothing then "" else + repo_root = enso_project.root.parent.parent.absolute.normalize + IO.println repo_root + path = File.new (location_match.get 1) + IO.println path + relative_path = repo_root.relativize path + IO.println relative_path + line = location_match.get 2 + ",file="+(sanitize_parameter relative_path.to_text)+",line="+(sanitize_parameter line)+"" + IO.println "::error title="+(sanitize_parameter title)+location_part+"::"+(sanitize_message message) ## Prints all the results, optionally writing them to a jUnit XML output. From 95e61275a9398418c43d7e5195ddc659930a46d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Sat, 17 Aug 2024 00:08:20 +0200 Subject: [PATCH 11/12] why was the file to_text absolute???? --- distribution/lib/Standard/Base/0.0.0-dev/src/System/File.enso | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/System/File.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/System/File.enso index fab85a043fa1..3c90c29bfe23 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/System/File.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/System/File.enso @@ -823,9 +823,9 @@ type File list_immediate_children self = Vector.from_polyglot_array (self.list_immediate_children_array) ## PRIVATE - Return the absolute path of this File + Return the path that this file represents. to_text : Text - to_text self = self.absolute . path + to_text self = self.path ## PRIVATE Convert to a display representation of this File. From f94f25c8af02803fed5657cd738ac73a1c5a1db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Sat, 17 Aug 2024 00:13:34 +0200 Subject: [PATCH 12/12] fix --- .../lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso b/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso index 9b0f885d4a6c..bc6082053adc 100644 --- a/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso +++ b/distribution/lib/Standard/Test/0.0.0-dev/src/Test_Reporter.enso @@ -99,13 +99,10 @@ report_github_error_message (title : Text) (message : Text) = location_match = Regex.compile "at ((?:[A-Za-z]:)?[^:]+):([0-9]+):" . match message location_part = if location_match.is_nothing then "" else repo_root = enso_project.root.parent.parent.absolute.normalize - IO.println repo_root path = File.new (location_match.get 1) - IO.println path relative_path = repo_root.relativize path - IO.println relative_path line = location_match.get 2 - ",file="+(sanitize_parameter relative_path.to_text)+",line="+(sanitize_parameter line)+"" + ",file="+(sanitize_parameter relative_path.path)+",line="+(sanitize_parameter line)+"" IO.println "::error title="+(sanitize_parameter title)+location_part+"::"+(sanitize_message message) ## Prints all the results, optionally writing them to a jUnit XML output.