From 6b42d0323cb137847fd3de079b2ca7bf1e326bc0 Mon Sep 17 00:00:00 2001 From: John Konecny <24961694+jfkonecn@users.noreply.github.com> Date: Tue, 5 Nov 2024 09:18:51 -0500 Subject: [PATCH 1/2] Added llms.txt --- www/content/tutorial.md | 4 ++++ www/main.roc | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/www/content/tutorial.md b/www/content/tutorial.md index 9c5448622e..afe8f47eda 100644 --- a/www/content/tutorial.md +++ b/www/content/tutorial.md @@ -25,6 +25,10 @@

Roc doesn’t have a numbered release or an installer yet, but you can follow the install instructions for your OS here . If you get stuck, friendly people will be happy to help if you open a topic in #beginners on Roc Zulip Chat and ask for assistance!

+## [LLM Docs](#llm-docs) {#llm-docs} + +We have experimental LLM-friendly text files for our [tutorial](/llms.txt) and [standard library](/builtins/llms.txt) that you can use to prompt your favorite LLM to answer your questions about Roc! + ## [REPL](#repl) {#repl} Let's start by getting acquainted with Roc's [_Read-Eval-Print-Loop_](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop), or **REPL** for short. diff --git a/www/main.roc b/www/main.roc index 5a01783af3..afa1e4de8c 100644 --- a/www/main.roc +++ b/www/main.roc @@ -6,11 +6,15 @@ import pf.SSG import pf.Types exposing [Args] import pf.Html exposing [header, nav, div, link, attribute, text, a, span, html, head, body, meta, script, footer, br] import pf.Html.Attributes exposing [id, ariaLabel, ariaHidden, title, href, class, rel, type, content, lang, charset, name, color] +import "content/tutorial.md" as tutorialMarkdown : Str + import InteractiveExample main : Args -> Task {} _ main = \{ inputDir, outputDir } -> + SSG.writeFile! { outputDir, relpath: Types.toRelPath "llms.txt", content: tutorialMarkdown } + # get the path and url of markdown files in content directory files = SSG.files! inputDir From 4249cd478487fa64c89570dac48c3d9c01b6d3a0 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sat, 9 Nov 2024 13:51:46 +0100 Subject: [PATCH 2/2] ignore test debug exceptions in all contexts --- .github/workflows/ubuntu_x86_64_nix_debug.yml | 2 +- crates/compiler/uitest/src/uitest.rs | 8 ++++++++ crates/repl_test/src/tests.rs | 11 ++++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ubuntu_x86_64_nix_debug.yml b/.github/workflows/ubuntu_x86_64_nix_debug.yml index 05835bb932..9ec90dede6 100644 --- a/.github/workflows/ubuntu_x86_64_nix_debug.yml +++ b/.github/workflows/ubuntu_x86_64_nix_debug.yml @@ -24,4 +24,4 @@ jobs: # for skipped tests; see #6946, #6947 - name: cargo test without --release - run: nix develop -c sh -c 'export ROC_CHECK_MONO_IR=1 && cargo test -- --skip tests/exhaustive/match_on_result_with_uninhabited_error_destructuring_in_lambda_syntax.txt --skip tests::identity_lambda --skip tests::issue_2300 --skip tests::issue_2582_specialize_result_value --skip tests::sum_lambda' + run: nix develop -c sh -c 'export ROC_CHECK_MONO_IR=1 && cargo test' diff --git a/crates/compiler/uitest/src/uitest.rs b/crates/compiler/uitest/src/uitest.rs index 5c792aadff..449b67c538 100644 --- a/crates/compiler/uitest/src/uitest.rs +++ b/crates/compiler/uitest/src/uitest.rs @@ -77,6 +77,14 @@ fn collect_uitest_files() -> io::Result> { } if path.extension() == Some(OsStr::new("txt")) { + // see issue 6947 + if cfg!(debug_assertions) + && path.to_string_lossy().contains( + "match_on_result_with_uninhabited_error_destructuring_in_lambda_syntax", + ) + { + continue; + } tests.push(path); } } diff --git a/crates/repl_test/src/tests.rs b/crates/repl_test/src/tests.rs index 7af99812c7..db99012d9d 100644 --- a/crates/repl_test/src/tests.rs +++ b/crates/repl_test/src/tests.rs @@ -624,12 +624,15 @@ fn list_of_3_field_records() { ); } +// not(debug_assertions) because of issue #6946 +#[cfg(not(debug_assertions))] #[test] fn identity_lambda() { expect_success("\\x -> x", " : a -> a"); } -#[cfg(not(feature = "wasm"))] +// not(debug_assertions) because of issue #6946 +#[cfg(all(not(feature = "wasm"), not(debug_assertions)))] #[test] fn sum_lambda() { expect_success("\\x, y -> x + y", " : Num a, Num a -> Num a"); @@ -1049,7 +1052,8 @@ fn large_nullable_wrapped_tag_union() { ) } -#[cfg(not(feature = "wasm"))] +// not(debug_assertions) because of issue #6946 +#[cfg(all(not(feature = "wasm"), not(debug_assertions)))] #[test] fn issue_2300() { expect_success( @@ -1330,7 +1334,8 @@ fn box_box_type_alias() { } #[test] -#[cfg(not(feature = "wasm"))] +// not(debug_assertions) because of issue #6946 +#[cfg(all(not(feature = "wasm"), not(debug_assertions)))] fn issue_2582_specialize_result_value() { expect_success( r#"\x, list -> if x > 0 then List.first list else Ok """#,