repo stringlengths 5 53 | pr_number int32 1 321k | task_type stringclasses 2
values | issue_text stringlengths 0 81.2k | pr_title stringlengths 1 319 | pr_body stringlengths 0 105k | base_sha stringlengths 40 40 | head_sha stringlengths 40 40 | gold_diff stringlengths 0 202M | changed_files listlengths 0 100 | review_threads listlengths 0 100 | test_patch stringlengths 0 23.4M | merged bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
typst/typst | 8,424 | issue_to_patch | Refactor font subsystem a bit | This PR refactors parts of the shaping and font handling code in preparation of https://github.com/typst/typst/pull/8425. | 85b7728308219cfa5231347474e8629033b333d1 | 38d9f433676ab65430a124003a6d21a6d1d19734 | diff --git a/crates/typst-layout/src/inline/line.rs b/crates/typst-layout/src/inline/line.rs
index e1bf9067805f..6677e6b2d96d 100644
--- a/crates/typst-layout/src/inline/line.rs
+++ b/crates/typst-layout/src/inline/line.rs
@@ -6,7 +6,7 @@ use typst_library::foundations::Resolve;
use typst_library::introspection::{Spli... | [
"crates/typst-layout/src/inline/line.rs",
"crates/typst-layout/src/inline/shaping.rs",
"crates/typst-layout/src/math/shaping.rs",
"crates/typst-library/src/math/style.rs",
"crates/typst-library/src/text/font/book.rs",
"crates/typst-library/src/text/font/info.rs",
"crates/typst-library/src/text/font/metr... | [] | diff --git a/tests/suite/layout/inline/text.typ b/tests/suite/layout/inline/text.typ
index a49ad95e9e87..58c71f0c061e 100644
--- a/tests/suite/layout/inline/text.typ
+++ b/tests/suite/layout/inline/text.typ
@@ -65,30 +65,30 @@ fi vs. #text(features: (liga: 0))[No fi]
#set text(features: false)
--- text-features-non... | true | |
typst/typst | 7,908 | issue_to_patch | A few tiny docs prose updates | These are a couple of tiny unimportant wording changes and typos. Feel free to close if undesired.
When reading through the documentation, I was unclear as to why the special ternary `set expr if bool` syntax was needed, as I didn't realize "block" referred to both content and code blocks when talking about how `set... | ce49aa01808a3eab29cb95244a022128e886ddf9 | b49942c7cbd894e1c6bff84738070eb4e9d750f1 | diff --git a/docs/content/reference/language/scripting.typ b/docs/content/reference/language/scripting.typ
index 0b4c54933cdf..4f4a8dc3cf4d 100644
--- a/docs/content/reference/language/scripting.typ
+++ b/docs/content/reference/language/scripting.typ
@@ -51,7 +51,7 @@ It explains #name.
Sum is #my-add(2, 3).
```
-L... | [
"docs/content/reference/language/scripting.typ",
"docs/content/reference/language/styling.typ"
] | [
{
"comment": "I feel like this addition is not quite enough to make it clear. I would either drop it or expand it.",
"path": "docs/reference/language/scripting.md",
"hunk": "@@ -84,9 +84,9 @@ Sum is #my-add(2, 3).\n \n Let bindings can also be used to destructure [arrays]($array) and\n [dictionaries]($d... | true | ||
typst/typst | 8,364 | issue_to_patch | Doc search box improvements | This improves the documentation search boxes (including the symbol list search boxes).
The first commit makes the search icon non-selectable and `pointer-events: none;` so that clicking it targets the input box below.
The second commit adds padding to the right of the search box, which is an improvement imo. I ca... | 848c4c2b8730932d8b5e16072e1a56f127d41d9c | ce45a9eb6f68c1503f49ce2bc46968c76ec74558 | diff --git a/docs/assets/docs.css b/docs/assets/docs.css
index ee1685f5de29..d0fba1f941e7 100644
--- a/docs/assets/docs.css
+++ b/docs/assets/docs.css
@@ -361,6 +361,8 @@ a.chain img {
position: absolute;
top: 7px;
left: 8px;
+ pointer-events: none;
+ user-select: none;
}
.search input {
| [
"docs/assets/docs.css"
] | [] | true | ||
typst/typst | 8,430 | issue_to_patch | Don't compress PDF content streams in pretty mode | The ASCII-compatible setting that is already enabled when using `--pretty` bloats the PDF quite a bit. The `--pretty` mode is thus not really suitable or intended for proper distribution but to produce a human-readable file, e.g. for debugging. In the spirit of this, we should also keep the content streams uncompressed... | d186deeca6c6654dc43fb1cc6af385f75c7d3c8f | deaf58c405a127c4e0817cad6843ecc7f75b3489 | diff --git a/crates/typst-pdf/src/convert.rs b/crates/typst-pdf/src/convert.rs
index 0c1cd964d184..96ebda6ecbbc 100644
--- a/crates/typst-pdf/src/convert.rs
+++ b/crates/typst-pdf/src/convert.rs
@@ -48,7 +48,7 @@ pub fn convert(
link_resolver: Option<Tracked<LateLinkResolver>>,
) -> SourceResult<Vec<u8>> {
l... | [
"crates/typst-pdf/src/convert.rs"
] | [] | true | ||
typst/typst | 8,407 | issue_to_patch | Implement field access for `arguments` and add IDE completions | Laurenz asked me to adjust #7676 to fix the merge conflicts and to add IDE completions for argument fields so that we can get it merged before the release.
I have also updated the docs slightly and added more tests, and I have reworked the error messages when trying to call a named argument field like a method so th... | 1e9ba172dd619988adeee44f640ecf363c75e543 | 8c8fa1bb62c051015583d5ca3267b80b9fc151fb | diff --git a/crates/typst-eval/src/access.rs b/crates/typst-eval/src/access.rs
index c82b9339adda..59476e1e19d6 100644
--- a/crates/typst-eval/src/access.rs
+++ b/crates/typst-eval/src/access.rs
@@ -84,7 +84,11 @@ pub(crate) fn access_dict<'a>(
let span = access.target().span();
if matches!(
... | [
"crates/typst-eval/src/access.rs",
"crates/typst-eval/src/call.rs",
"crates/typst-ide/src/complete.rs",
"crates/typst-library/src/foundations/args.rs",
"crates/typst-library/src/foundations/dict.rs",
"crates/typst-library/src/foundations/value.rs",
"tests/suite/foundations/arguments.typ",
"tests/suite... | [] | diff --git a/tests/suite/foundations/arguments.typ b/tests/suite/foundations/arguments.typ
index fadac74b2999..ccff45a891eb 100644
--- a/tests/suite/foundations/arguments.typ
+++ b/tests/suite/foundations/arguments.typ
@@ -14,16 +14,86 @@
#test(args.at(2), 3)
#test(args.at("a"), 2)
---- arguments-at-invalid-index e... | true | |
typst/typst | 8,406 | issue_to_patch | Update to `icu4x` 2.x
More complicated than it appears on the surface.
Prior art: https://github.com/typst/typst/pull/7412 | Update `icu4x` to version 2.2 | Updates `icu4x` to version 2.2.0 and uses constant compiled data instead of postcard data where possible.
This depends on the updated postcard data for CJ line segmenting in [my fork](https://github.com/isuffix/typst-assets/tree/upgrade-icu4x) of `typst-assets`, but can target the official repo once https://github.c... | 0e4329a099e88492961580be3f8df938139c67e6 | 7152b97f77381f60c32338823b0609002934b59a | diff --git a/Cargo.lock b/Cargo.lock
index 4961e30139f2..5530130996e5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -404,9 +404,12 @@ dependencies = [
[[package]]
name = "cobs"
-version = "0.2.3"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67ba02a97a2bd10f4b59b25c... | [
"Cargo.lock",
"Cargo.toml",
"crates/typst-layout/Cargo.toml",
"crates/typst-layout/src/inline/linebreak.rs",
"crates/typst-library/Cargo.toml",
"crates/typst-library/src/math/accent.rs",
"crates/typst-library/src/text/mod.rs",
"tests/ref/pdf/hashes.txt",
"tests/ref/render/issue-1920-linebreak-guille... | [] | diff --git a/tests/ref/pdf/hashes.txt b/tests/ref/pdf/hashes.txt
index bb4a0d1f6359..6e2a21b62534 100644
--- a/tests/ref/pdf/hashes.txt
+++ b/tests/ref/pdf/hashes.txt
@@ -660,6 +660,7 @@ a5ab5ad13e57301e042f5b00f75fbafa issue-1373-bidi-tofus
75df77d2fa2f371e9d37a246b10b7e2d issue-1833-locate-place
af08643822c7e5c95c8... | true |
typst/typst | 8,257 | issue_to_patch | Revert raw language tag changes temporarily with warnings for re-enabling in the future | This PR temporarily reverts the change to raw language tag parsing from #7337 to the current (0.14) behavior for 0.15. But since the change from #7337 is still desireable (and should land in 0.16), I've added warnings to raw blocks whose language tag would differ with the new behavior so that users are aware of the cha... | 7152b97f77381f60c32338823b0609002934b59a | ee553857bc6963aa1152137e80bdf8a26a96c111 | diff --git a/crates/typst-library/src/text/raw.rs b/crates/typst-library/src/text/raw.rs
index b9520a58f640..bc5a167aa934 100644
--- a/crates/typst-library/src/text/raw.rs
+++ b/crates/typst-library/src/text/raw.rs
@@ -31,13 +31,19 @@ use crate::visualize::Color;
/// Raw text with optional syntax highlighting.
///
/... | [
"crates/typst-library/src/text/raw.rs",
"crates/typst-syntax/src/lexer.rs",
"tests/suite/text/raw.typ"
] | [
{
"comment": "What does this TODO mean?",
"path": "crates/typst-syntax/src/lexer.rs",
"hunk": "@@ -221,31 +220,120 @@ impl Lexer<'_> {\n }\n let end = self.s.cursor();\n \n- let mut nodes = Vec::with_capacity(3); // Will have at least 3.\n+ let ticks = self.s.from(end - bac... | diff --git a/tests/suite/text/raw.typ b/tests/suite/text/raw.typ
index 1eceed2f1946..eed609e08f1b 100644
--- a/tests/suite/text/raw.typ
+++ b/tests/suite/text/raw.typ
@@ -68,6 +68,194 @@ The keyword ```rust let```.
B
```
+--- raw-empty-inline eval ---
+#let raw = ``
+#test(raw.text, "")
+#test(raw.block... | true | |
typst/typst | 8,257 | comment_to_fix | Revert raw language tag changes temporarily with warnings for re-enabling in the future | This could be written fairly nicely with `.then(|| ..)` | 7152b97f77381f60c32338823b0609002934b59a | ee553857bc6963aa1152137e80bdf8a26a96c111 | diff --git a/crates/typst-syntax/src/lexer.rs b/crates/typst-syntax/src/lexer.rs
index 38f92100f8ff..3413a1e35dc0 100644
--- a/crates/typst-syntax/src/lexer.rs
+++ b/crates/typst-syntax/src/lexer.rs
@@ -183,74 +183,10 @@ impl Lexer<'_> {
}
}
-/// Markup.
+/// Raw.
impl Lexer<'_> {
- fn markup(&mut self, sta... | [
"crates/typst-syntax/src/lexer.rs"
] | [
{
"comment": "This could be written fairly nicely with `.then(|| ..)`",
"path": "crates/typst-syntax/src/lexer.rs",
"hunk": "@@ -221,31 +220,120 @@ impl Lexer<'_> {\n }\n let end = self.s.cursor();\n \n- let mut nodes = Vec::with_capacity(3); // Will have at least 3.\n+ let... | true | ||
typst/typst | 8,257 | comment_to_fix | Revert raw language tag changes temporarily with warnings for re-enabling in the future | I think I would inline the function as I'm not sure it's really a well segmented conceptually. The signature is a bit overloaded with the three return values. And it doesn't do the full parsing either since the opening backticks are already processed.
Since `fn raw` would become quite long, I would suggest moving the ... | 7152b97f77381f60c32338823b0609002934b59a | ee553857bc6963aa1152137e80bdf8a26a96c111 | diff --git a/crates/typst-syntax/src/lexer.rs b/crates/typst-syntax/src/lexer.rs
index 38f92100f8ff..3413a1e35dc0 100644
--- a/crates/typst-syntax/src/lexer.rs
+++ b/crates/typst-syntax/src/lexer.rs
@@ -183,74 +183,10 @@ impl Lexer<'_> {
}
}
-/// Markup.
+/// Raw.
impl Lexer<'_> {
- fn markup(&mut self, sta... | [
"crates/typst-syntax/src/lexer.rs"
] | [
{
"comment": "I think I would inline the function as I'm not sure it's really a well segmented conceptually. The signature is a bit overloaded with the three return values. And it doesn't do the full parsing either since the opening backticks are already processed.\n\nSince `fn raw` would become quite long, I w... | true | ||
typst/typst | 8,257 | comment_to_fix | Revert raw language tag changes temporarily with warnings for re-enabling in the future | Drop the "the", it's cleaner. | 7152b97f77381f60c32338823b0609002934b59a | ee553857bc6963aa1152137e80bdf8a26a96c111 | diff --git a/crates/typst-syntax/src/lexer.rs b/crates/typst-syntax/src/lexer.rs
index 38f92100f8ff..3413a1e35dc0 100644
--- a/crates/typst-syntax/src/lexer.rs
+++ b/crates/typst-syntax/src/lexer.rs
@@ -183,74 +183,10 @@ impl Lexer<'_> {
}
}
-/// Markup.
+/// Raw.
impl Lexer<'_> {
- fn markup(&mut self, sta... | [
"crates/typst-syntax/src/lexer.rs"
] | [
{
"comment": "Drop the \"the\", it's cleaner.",
"path": "crates/typst-syntax/src/lexer.rs",
"hunk": "@@ -221,31 +220,120 @@ impl Lexer<'_> {\n }\n let end = self.s.cursor();\n \n- let mut nodes = Vec::with_capacity(3); // Will have at least 3.\n+ let ticks = self.s.from(end... | true | ||
typst/typst | 8,257 | comment_to_fix | Revert raw language tag changes temporarily with warnings for re-enabling in the future | I don't think we need to. | 7152b97f77381f60c32338823b0609002934b59a | ee553857bc6963aa1152137e80bdf8a26a96c111 | diff --git a/crates/typst-syntax/src/lexer.rs b/crates/typst-syntax/src/lexer.rs
index 38f92100f8ff..3413a1e35dc0 100644
--- a/crates/typst-syntax/src/lexer.rs
+++ b/crates/typst-syntax/src/lexer.rs
@@ -183,74 +183,10 @@ impl Lexer<'_> {
}
}
-/// Markup.
+/// Raw.
impl Lexer<'_> {
- fn markup(&mut self, sta... | [
"crates/typst-syntax/src/lexer.rs"
] | [
{
"comment": "I don't think we need to.",
"path": "crates/typst-syntax/src/lexer.rs",
"hunk": "@@ -221,31 +220,120 @@ impl Lexer<'_> {\n }\n let end = self.s.cursor();\n \n- let mut nodes = Vec::with_capacity(3); // Will have at least 3.\n+ let ticks = self.s.from(end - bac... | true | ||
typst/typst | 8,257 | comment_to_fix | Revert raw language tag changes temporarily with warnings for re-enabling in the future | produces an empty raw element -> produces empty raw text | 7152b97f77381f60c32338823b0609002934b59a | ee553857bc6963aa1152137e80bdf8a26a96c111 | diff --git a/crates/typst-library/src/text/raw.rs b/crates/typst-library/src/text/raw.rs
index b9520a58f640..bc5a167aa934 100644
--- a/crates/typst-library/src/text/raw.rs
+++ b/crates/typst-library/src/text/raw.rs
@@ -31,13 +31,19 @@ use crate::visualize::Color;
/// Raw text with optional syntax highlighting.
///
/... | [
"crates/typst-library/src/text/raw.rs"
] | [
{
"comment": "produces an empty raw element -> produces empty raw text",
"path": "crates/typst-library/src/text/raw.rs",
"hunk": "@@ -114,15 +104,152 @@ use crate::visualize::Color;\n /// ````\n ///\n /// In addition, you can customize the syntax highlighting colors by setting a\n-/// custom theme throu... | true | ||
typst/typst | 8,257 | comment_to_fix | Revert raw language tag changes temporarily with warnings for re-enabling in the future | I think this is a bit much. Maybe we could trim it down to this:
```
/// Notable differences to Markdown include that single backticks can enclose
/// text spanning multiple lines without removing indentation and that
/// three-plus backtick syntax still interprets language tags when used inline.
``` | 7152b97f77381f60c32338823b0609002934b59a | ee553857bc6963aa1152137e80bdf8a26a96c111 | diff --git a/crates/typst-library/src/text/raw.rs b/crates/typst-library/src/text/raw.rs
index b9520a58f640..bc5a167aa934 100644
--- a/crates/typst-library/src/text/raw.rs
+++ b/crates/typst-library/src/text/raw.rs
@@ -31,13 +31,19 @@ use crate::visualize::Color;
/// Raw text with optional syntax highlighting.
///
/... | [
"crates/typst-library/src/text/raw.rs"
] | [
{
"comment": "I think this is a bit much. Maybe we could trim it down to this:\n```\n/// Notable differences to Markdown include that single backticks can enclose\n/// text spanning multiple lines without removing indentation and that\n/// three-plus backtick syntax still interprets language tags when used inli... | true | ||
typst/typst | 8,257 | comment_to_fix | Revert raw language tag changes temporarily with warnings for re-enabling in the future | This feels redundant with the previous paragraph. I'd probably keep this and drop the previous one entirely. | 7152b97f77381f60c32338823b0609002934b59a | ee553857bc6963aa1152137e80bdf8a26a96c111 | diff --git a/crates/typst-library/src/text/raw.rs b/crates/typst-library/src/text/raw.rs
index b9520a58f640..bc5a167aa934 100644
--- a/crates/typst-library/src/text/raw.rs
+++ b/crates/typst-library/src/text/raw.rs
@@ -31,13 +31,19 @@ use crate::visualize::Color;
/// Raw text with optional syntax highlighting.
///
/... | [
"crates/typst-library/src/text/raw.rs"
] | [
{
"comment": "This feels redundant with the previous paragraph. I'd probably keep this and drop the previous one entirely.",
"path": "crates/typst-library/src/text/raw.rs",
"hunk": "@@ -114,15 +104,152 @@ use crate::visualize::Color;\n /// ````\n ///\n /// In addition, you can customize the syntax highl... | true | ||
typst/typst | 8,257 | comment_to_fix | Revert raw language tag changes temporarily with warnings for re-enabling in the future | I don't like the "is meant" as this is not the place to defend design rationale. I would also prefer a more neutral tone over the word "smart". We could just trim this down to: `Raw syntax using _three or more_ backticks has the following properties:` | 7152b97f77381f60c32338823b0609002934b59a | ee553857bc6963aa1152137e80bdf8a26a96c111 | diff --git a/crates/typst-library/src/text/raw.rs b/crates/typst-library/src/text/raw.rs
index b9520a58f640..bc5a167aa934 100644
--- a/crates/typst-library/src/text/raw.rs
+++ b/crates/typst-library/src/text/raw.rs
@@ -31,13 +31,19 @@ use crate::visualize::Color;
/// Raw text with optional syntax highlighting.
///
/... | [
"crates/typst-library/src/text/raw.rs"
] | [
{
"comment": "I don't like the \"is meant\" as this is not the place to defend design rationale. I would also prefer a more neutral tone over the word \"smart\". We could just trim this down to: `Raw syntax using _three or more_ backticks has the following properties:`",
"path": "crates/typst-library/src/te... | true | ||
typst/typst | 8,257 | comment_to_fix | Revert raw language tag changes temporarily with warnings for re-enabling in the future | The items in this list do not share a level of abstraction. For example, the first item is the full behavioral definition where the paragraph below is essentially guidance on how to escape a sequence of backticks (conceptually a `details` element). However, the second paragraph is more like a heading with a full defini... | 7152b97f77381f60c32338823b0609002934b59a | ee553857bc6963aa1152137e80bdf8a26a96c111 | diff --git a/crates/typst-library/src/text/raw.rs b/crates/typst-library/src/text/raw.rs
index b9520a58f640..bc5a167aa934 100644
--- a/crates/typst-library/src/text/raw.rs
+++ b/crates/typst-library/src/text/raw.rs
@@ -31,13 +31,19 @@ use crate::visualize::Color;
/// Raw text with optional syntax highlighting.
///
/... | [
"crates/typst-library/src/text/raw.rs"
] | [
{
"comment": "The items in this list do not share a level of abstraction. For example, the first item is the full behavioral definition where the paragraph below is essentially guidance on how to escape a sequence of backticks (conceptually a `details` element). However, the second paragraph is more like a head... | true | ||
typst/typst | 8,257 | comment_to_fix | Revert raw language tag changes temporarily with warnings for re-enabling in the future | ASCII is not a concept we introduce in the docs and inconsistent with the use of _linebreak character_ above. I'd recommend sticking to _space_ or _space character._
| 7152b97f77381f60c32338823b0609002934b59a | ee553857bc6963aa1152137e80bdf8a26a96c111 | diff --git a/crates/typst-library/src/text/raw.rs b/crates/typst-library/src/text/raw.rs
index b9520a58f640..bc5a167aa934 100644
--- a/crates/typst-library/src/text/raw.rs
+++ b/crates/typst-library/src/text/raw.rs
@@ -31,13 +31,19 @@ use crate::visualize::Color;
/// Raw text with optional syntax highlighting.
///
/... | [
"crates/typst-library/src/text/raw.rs"
] | [
{
"comment": "ASCII is not a concept we introduce in the docs and inconsistent with the use of _linebreak character_ above. I'd recommend sticking to _space_ or _space character._\n",
"path": "crates/typst-library/src/text/raw.rs",
"hunk": "@@ -114,15 +104,152 @@ use crate::visualize::Color;\n /// ````\... | true | ||
typst/typst | 8,257 | comment_to_fix | Revert raw language tag changes temporarily with warnings for re-enabling in the future | Doesn't this kinda belong in the last point? | 7152b97f77381f60c32338823b0609002934b59a | ee553857bc6963aa1152137e80bdf8a26a96c111 | diff --git a/crates/typst-library/src/text/raw.rs b/crates/typst-library/src/text/raw.rs
index b9520a58f640..bc5a167aa934 100644
--- a/crates/typst-library/src/text/raw.rs
+++ b/crates/typst-library/src/text/raw.rs
@@ -31,13 +31,19 @@ use crate::visualize::Color;
/// Raw text with optional syntax highlighting.
///
/... | [
"crates/typst-library/src/text/raw.rs"
] | [
{
"comment": "Doesn't this kinda belong in the last point?",
"path": "crates/typst-library/src/text/raw.rs",
"hunk": "@@ -114,15 +104,152 @@ use crate::visualize::Color;\n /// ````\n ///\n /// In addition, you can customize the syntax highlighting colors by setting a\n-/// custom theme through the @raw.... | true | ||
typst/typst | 8,257 | comment_to_fix | Revert raw language tag changes temporarily with warnings for re-enabling in the future | Avoid parentheses in favor of commas or changing word order | 7152b97f77381f60c32338823b0609002934b59a | ee553857bc6963aa1152137e80bdf8a26a96c111 | diff --git a/crates/typst-library/src/text/raw.rs b/crates/typst-library/src/text/raw.rs
index b9520a58f640..bc5a167aa934 100644
--- a/crates/typst-library/src/text/raw.rs
+++ b/crates/typst-library/src/text/raw.rs
@@ -31,13 +31,19 @@ use crate::visualize::Color;
/// Raw text with optional syntax highlighting.
///
/... | [
"crates/typst-library/src/text/raw.rs"
] | [
{
"comment": "Avoid parentheses in favor of commas or changing word order",
"path": "crates/typst-library/src/text/raw.rs",
"hunk": "@@ -114,15 +104,152 @@ use crate::visualize::Color;\n /// ````\n ///\n /// In addition, you can customize the syntax highlighting colors by setting a\n-/// custom theme th... | true | ||
typst/typst | 8,257 | comment_to_fix | Revert raw language tag changes temporarily with warnings for re-enabling in the future | We try to avoid passive voice. Common replacements include "Typst will" or "Typst does", "You can", "You must", or imperative voice, depending on the use case. | 7152b97f77381f60c32338823b0609002934b59a | ee553857bc6963aa1152137e80bdf8a26a96c111 | diff --git a/crates/typst-library/src/text/raw.rs b/crates/typst-library/src/text/raw.rs
index b9520a58f640..bc5a167aa934 100644
--- a/crates/typst-library/src/text/raw.rs
+++ b/crates/typst-library/src/text/raw.rs
@@ -31,13 +31,19 @@ use crate::visualize::Color;
/// Raw text with optional syntax highlighting.
///
/... | [
"crates/typst-library/src/text/raw.rs"
] | [
{
"comment": "We try to avoid passive voice. Common replacements include \"Typst will\" or \"Typst does\", \"You can\", \"You must\", or imperative voice, depending on the use case.",
"path": "crates/typst-library/src/text/raw.rs",
"hunk": "@@ -114,15 +104,152 @@ use crate::visualize::Color;\n /// ````\... | true | ||
typst/typst | 8,257 | comment_to_fix | Revert raw language tag changes temporarily with warnings for re-enabling in the future | ```suggestion
/// #let code-point = "https://www.unicode.org/glossary/#code_point"
///
/// Note that this check treats tabs and spaces as equivalent characters
``` | 7152b97f77381f60c32338823b0609002934b59a | ee553857bc6963aa1152137e80bdf8a26a96c111 | diff --git a/crates/typst-library/src/text/raw.rs b/crates/typst-library/src/text/raw.rs
index b9520a58f640..bc5a167aa934 100644
--- a/crates/typst-library/src/text/raw.rs
+++ b/crates/typst-library/src/text/raw.rs
@@ -31,13 +31,19 @@ use crate::visualize::Color;
/// Raw text with optional syntax highlighting.
///
/... | [
"crates/typst-library/src/text/raw.rs"
] | [
{
"comment": "```suggestion\n/// #let code-point = \"https://www.unicode.org/glossary/#code_point\"\n///\n/// Note that this check treats tabs and spaces as equivalent characters\n```",
"path": "crates/typst-library/src/text/raw.rs",
"hunk": "@@ -114,15 +104,152 @@ use crate::visualize::Color;\n ///... | true | ||
typst/typst | 8,393 | issue_to_patch | Rename `SyntaxNode::{text, into_text}` to `{leaf_text, full_text}` | This was mentioned in https://github.com/typst/typst/pull/8188#discussion_r3233728925
I'm just renaming for now and changing `full_text` to use `&self` instead of `self`. I'll leave implementing some kind of `summarize` method for later (or someone else). | 44b3f78ed37fedea75e911dde2269ef86c45316f | ff7ea29e8a8c49e73d5e27da49d322c036703317 | diff --git a/crates/typst-eval/src/call.rs b/crates/typst-eval/src/call.rs
index 4c685f070857..bdcd32ffada0 100644
--- a/crates/typst-eval/src/call.rs
+++ b/crates/typst-eval/src/call.rs
@@ -129,7 +129,7 @@ fn eval_math_call(vm: &mut Vm, math_call: ast::MathCall) -> SourceResult<Value>
span,
... | [
"crates/typst-eval/src/call.rs",
"crates/typst-eval/src/code.rs",
"crates/typst-ide/src/complete.rs",
"crates/typst-ide/src/tooltip.rs",
"crates/typst-library/src/foundations/decimal.rs",
"crates/typst-syntax/src/ast.rs",
"crates/typst-syntax/src/highlight.rs",
"crates/typst-syntax/src/node.rs",
"cr... | [] | true | ||
typst/typst | 8,421 | issue_to_patch | Add compiler version to docs
It'd be useful to have a commit hash of the typst compiler shown somewhere on the website so we know what version we're using.
Reference introduction mentions "parts" that don't exist
### Description
On https://typst.app/docs/reference/, there are mentions of "parts" that roughly corres... | Update Overview and Reference sections | Supersedes #8302
Fixes #8140
Closes #738
This commit revamps the overview and documentation pages. It introduces a new section "Reading the reference", explaining the labels in the reference and adapitvely renders guides towards the reference sections in HTML and PDF. The overview section has been rewritten to bet... | 6ca538fc228c6b1f734e44f514c8f97de24cb77a | 7ba40e4e187b984e2c1aaa5ee6104258f469bc43 | diff --git a/docs/assets/docs.css b/docs/assets/docs.css
index b0408e53b467..74dd92a755a8 100644
--- a/docs/assets/docs.css
+++ b/docs/assets/docs.css
@@ -95,12 +95,19 @@ h4 code {
font-size: unset;
}
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+.reference-index .mod {
+ color: #565565;
+ font-style: italic;
+}... | [
"docs/assets/docs.css",
"docs/components/base.typ",
"docs/components/category.typ",
"docs/components/index.typ",
"docs/content/overview.typ",
"docs/content/reference/index.typ",
"docs/lib.typ",
"docs/src/world.rs"
] | [
{
"comment": "Is this true? For example, `text.size` can be used as a named or positional parameter, but it is not marked as a shorthand. Given the comment in `param-headline`, it seems this simply never appears in practice.\n\nI have been thinking about all this a bit (somewhat related to https://github.com/ty... | true | |
typst/typst | 8,421 | comment_to_fix | Update Overview and Reference sections | Is this true? For example, `text.size` can be used as a named or positional parameter, but it is not marked as a shorthand. Given the comment in `param-headline`, it seems this simply never appears in practice.
I have been thinking about all this a bit (somewhat related to https://github.com/typst/typst/issues/6227 an... | 6ca538fc228c6b1f734e44f514c8f97de24cb77a | 7ba40e4e187b984e2c1aaa5ee6104258f469bc43 | diff --git a/docs/content/reference/index.typ b/docs/content/reference/index.typ
index 73dab60f95a3..b88537624fbc 100644
--- a/docs/content/reference/index.typ
+++ b/docs/content/reference/index.typ
@@ -1,20 +1,59 @@
-#import "../../components/index.typ": docs-chapter, paged-heading-offset
+#import "../../components/in... | [
"docs/content/reference/index.typ"
] | [
{
"comment": "Is this true? For example, `text.size` can be used as a named or positional parameter, but it is not marked as a shorthand. Given the comment in `param-headline`, it seems this simply never appears in practice.\n\nI have been thinking about all this a bit (somewhat related to https://github.com/ty... | true | ||
typst/typst | 8,421 | comment_to_fix | Update Overview and Reference sections | > the compiler translates files in the Typst language into PDFs or HTML pages
What about SVG and PNG export targets? | 6ca538fc228c6b1f734e44f514c8f97de24cb77a | 7ba40e4e187b984e2c1aaa5ee6104258f469bc43 | diff --git a/docs/content/overview.typ b/docs/content/overview.typ
index 7dc1ab247fce..5751a5a316f9 100644
--- a/docs/content/overview.typ
+++ b/docs/content/overview.typ
@@ -1,4 +1,6 @@
-#import "../components/index.typ": big-nav-button, def-dest, docs-chapter, icon
+#import "../components/index.typ": (
+ big-nav-but... | [
"docs/content/overview.typ"
] | [
{
"comment": "> the compiler translates files in the Typst language into PDFs or HTML pages\r\n\r\nWhat about SVG and PNG export targets?",
"path": "docs/content/overview.typ",
"hunk": "@@ -21,8 +21,28 @@\n }),\n )\n \n-Welcome to Typst's documentation! Typst is a new markup-based typesetting system f... | true | ||
typst/typst | 8,429 | issue_to_patch | Bump codex to released version | d186deeca6c6654dc43fb1cc6af385f75c7d3c8f | 0da693d245245f289f1f765cd6c5e170708eabf5 | diff --git a/Cargo.lock b/Cargo.lock
index 5530130996e5..600df0210266 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -423,8 +423,9 @@ dependencies = [
[[package]]
name = "codex"
-version = "0.2.0"
-source = "git+https://github.com/typst/codex?rev=0426b6a#0426b6a97414064ad31d0b97d822566fe9df8b65"
+version = "0.3.0"
+so... | [
"Cargo.lock",
"Cargo.toml"
] | [] | true | |||
typst/typst | 8,278 | issue_to_patch | Copy button for code blocks in docs
### Description
Probably this is intended, but I was wondering: Why in the Typst documentation (and also in the packages readmes) there is no copy button for code blocks (like the one for the forum).
### Use Case
Easy copying docs code | Add copy button to code examples in documentation | This closes https://github.com/typst/typst/issues/8264 by adding a Copy button to all code examples (only those that have a preview).
The Copy button is added within the JavaScript script. Alternatively, it could be added in the Typst template directly, but this seemed less easy, and also the current solution has th... | 44b3f78ed37fedea75e911dde2269ef86c45316f | 6ccb0d40b42287eb428259122d3e1c0c054b4a03 | diff --git a/docs/assets/base.css b/docs/assets/base.css
index ebd94047a600..4fb23c222e99 100644
--- a/docs/assets/base.css
+++ b/docs/assets/base.css
@@ -153,6 +153,7 @@ The `url()` routes are replaced to include the docs base paths.
--action-secondary-hover: rgba(228, 229, 234, 1);
--brand: #239dad;
--text-p... | [
"docs/assets/base.css",
"docs/assets/docs.css",
"docs/assets/docs.js",
"docs/components/example.typ"
] | [
{
"comment": "We generally have a padding of 8px around icon buttons for a total touch target of 32x32px",
"path": "docs/assets/docs.css",
"hunk": "@@ -279,6 +279,17 @@ sup[role=\"doc-noteref\"] {\n \n /* Code example components */\n \n+pre > button.copy {\n+ top: -8px;\n+ right: -8px;\n+ padding: 2p... | true | |
typst/typst | 8,278 | comment_to_fix | Add copy button to code examples in documentation | The icon being visible all the time adds to much visual clutter I think. Instead, it should behave like this:
- It should be invisible by default
- It should be visible on hover of the code example. When displaying, it should fade its opacity in .2s or less using an appropriate easing function. This should be accompli... | 44b3f78ed37fedea75e911dde2269ef86c45316f | 6ccb0d40b42287eb428259122d3e1c0c054b4a03 | diff --git a/docs/assets/docs.js b/docs/assets/docs.js
index 9b7f451720a7..530b0c32971f 100644
--- a/docs/assets/docs.js
+++ b/docs/assets/docs.js
@@ -4,6 +4,7 @@
const assetBase = "/assets/";
const closeIconSrc = assetBase + "icons/16-close.svg";
const checkIconSrc = assetBase + "icons/16-check.svg";
+const copyIco... | [
"docs/assets/docs.js"
] | [
{
"comment": "The icon being visible all the time adds to much visual clutter I think. Instead, it should behave like this:\n\n- It should be invisible by default\n- It should be visible on hover of the code example. When displaying, it should fade its opacity in .2s or less using an appropriate easing function... | true | ||
typst/typst | 8,278 | comment_to_fix | Add copy button to code examples in documentation | If you follow my suggestion for page load behavior:
```suggestion
pre > button.copy:disabled {
color: rgba(25,24,31,0.500) /* Should be var(--text-disabled) */
}
.code-definition + h4,
``` | 44b3f78ed37fedea75e911dde2269ef86c45316f | 6ccb0d40b42287eb428259122d3e1c0c054b4a03 | diff --git a/docs/assets/docs.css b/docs/assets/docs.css
index b0408e53b467..a6af4a64b5ca 100644
--- a/docs/assets/docs.css
+++ b/docs/assets/docs.css
@@ -301,6 +301,58 @@ sup[role="doc-noteref"] {
/* Code example components */
+pre {
+ position: relative;
+}
+
+pre > button.copy {
+ top: 8px;
+ right: 8px;
+ ... | [
"docs/assets/docs.css"
] | [
{
"comment": "If you follow my suggestion for page load behavior:\n\n```suggestion\npre > button.copy:disabled {\n color: rgba(25,24,31,0.500) /* Should be var(--text-disabled) */\n}\n\n.code-definition + h4,\n```",
"path": "docs/assets/docs.css",
"hunk": "@@ -279,6 +279,17 @@ sup[role=\"doc-noteref\"]... | true | ||
typst/typst | 8,278 | comment_to_fix | Add copy button to code examples in documentation | Smart to do this instead of the `matchMedia` | 44b3f78ed37fedea75e911dde2269ef86c45316f | 6ccb0d40b42287eb428259122d3e1c0c054b4a03 | diff --git a/docs/assets/docs.css b/docs/assets/docs.css
index b0408e53b467..a6af4a64b5ca 100644
--- a/docs/assets/docs.css
+++ b/docs/assets/docs.css
@@ -301,6 +301,58 @@ sup[role="doc-noteref"] {
/* Code example components */
+pre {
+ position: relative;
+}
+
+pre > button.copy {
+ top: 8px;
+ right: 8px;
+ ... | [
"docs/assets/docs.css"
] | [
{
"comment": "Smart to do this instead of the `matchMedia`",
"path": "docs/assets/docs.css",
"hunk": "@@ -279,6 +279,58 @@ sup[role=\"doc-noteref\"] {\n \n /* Code example components */\n \n+pre {\n+ position: relative;\n+}\n+\n+pre > button.copy {\n+ top: 8px;\n+ right: 8px;\n+ padding: 8px;\n+ ba... | true | ||
typst/typst | 8,278 | comment_to_fix | Add copy button to code examples in documentation | ```suggestion
color: var(--text-primary);
```
In the component, text-primary looks better. | 44b3f78ed37fedea75e911dde2269ef86c45316f | 6ccb0d40b42287eb428259122d3e1c0c054b4a03 | diff --git a/docs/assets/docs.css b/docs/assets/docs.css
index b0408e53b467..a6af4a64b5ca 100644
--- a/docs/assets/docs.css
+++ b/docs/assets/docs.css
@@ -301,6 +301,58 @@ sup[role="doc-noteref"] {
/* Code example components */
+pre {
+ position: relative;
+}
+
+pre > button.copy {
+ top: 8px;
+ right: 8px;
+ ... | [
"docs/assets/docs.css"
] | [
{
"comment": "```suggestion\n color: var(--text-primary);\n```\n\nIn the component, text-primary looks better.",
"path": "docs/assets/docs.css",
"hunk": "@@ -279,6 +279,58 @@ sup[role=\"doc-noteref\"] {\n \n /* Code example components */\n \n+pre {\n+ position: relative;\n+}\n+\n+pre > button.copy {\n... | true | ||
typst/typst | 8,278 | comment_to_fix | Add copy button to code examples in documentation | Could you turn this into a `var` and define the appropriate variable? | 44b3f78ed37fedea75e911dde2269ef86c45316f | 6ccb0d40b42287eb428259122d3e1c0c054b4a03 | diff --git a/docs/assets/docs.css b/docs/assets/docs.css
index b0408e53b467..a6af4a64b5ca 100644
--- a/docs/assets/docs.css
+++ b/docs/assets/docs.css
@@ -301,6 +301,58 @@ sup[role="doc-noteref"] {
/* Code example components */
+pre {
+ position: relative;
+}
+
+pre > button.copy {
+ top: 8px;
+ right: 8px;
+ ... | [
"docs/assets/docs.css"
] | [
{
"comment": "Could you turn this into a `var` and define the appropriate variable?",
"path": "docs/assets/docs.css",
"hunk": "@@ -287,6 +287,58 @@ sup[role=\"doc-noteref\"] {\n \n /* Code example components */\n \n+pre {\n+ position: relative;\n+}\n+\n+pre > button.copy {\n+ top: 8px;\n+ right: 8px;... | true | ||
typst/typst | 8,278 | comment_to_fix | Add copy button to code examples in documentation | ```suggestion
copy-button + pre.body,
``` | 44b3f78ed37fedea75e911dde2269ef86c45316f | 6ccb0d40b42287eb428259122d3e1c0c054b4a03 | diff --git a/docs/components/example.typ b/docs/components/example.typ
index bfa1bd5ae3eb..0e83de3feb98 100644
--- a/docs/components/example.typ
+++ b/docs/components/example.typ
@@ -6,7 +6,7 @@
// Cooperates with `docs/src/example.rs`.
#import "system.typ": colors, sizes
-#import "base.typ": folding-details, label... | [
"docs/components/example.typ"
] | [
{
"comment": "```suggestion\n copy-button + pre.body,\n```",
"path": "docs/components/example.typ",
"hunk": "@@ -159,6 +159,22 @@\n )\n })\n } else {\n+ show html.elem.where(tag: \"pre\"): pre => {\n+ if pre.at(\"label\", default: none) == <_stop> {\n+ return pre\n+ ... | true | ||
typst/typst | 8,417 | issue_to_patch | typst suggest (e.g.) overline[] instead of overline() in math
### Description
When you are inside math and start typing "overline", underline, etc. typst suggest "overline[]" which will not render correctly in math as math will use it only with "()"
`$ underine[X] $` => <img width="96" height="31" alt="Image" src="h... | Make function autocomplete always use parenthesis in math mode | Fixes https://github.com/typst/typst/issues/8336 | 6ca538fc228c6b1f734e44f514c8f97de24cb77a | e9433ecfe44a2135bfe18cd438cc486ac6176cb4 | diff --git a/crates/typst-ide/src/complete.rs b/crates/typst-ide/src/complete.rs
index cdd1753ae778..7bf1e8a7ed1d 100644
--- a/crates/typst-ide/src/complete.rs
+++ b/crates/typst-ide/src/complete.rs
@@ -1296,7 +1296,12 @@ impl<'a> CompletionContext<'a> {
&& !self.after.starts_with(['(', '['])
{
... | [
"crates/typst-ide/src/complete.rs"
] | [] | true | |
typst/typst | 8,298 | issue_to_patch | Add links from documentation to compiler source
Hi, great project!
knowing almost nothing about the code stucture, yet, I would like links to the function definitions in the docs, e.g. as in the [nixpkgs manual](https://nixos.org/manual/nixpkgs/stable/#chap-functions).
I feel it would make it much easier to loca... | Add links to sources in the documentation | Closes https://github.com/typst/typst/issues/981.
I had to add a `stdx.commit` constant to construct GitHub permalinks.
To get the path of the file, I used `info.def-site.path`. Right now, there is no way to convert a `path` to a string, so I used a bit of a hack to get the file path as a string. I could add supp... | e45d37b333d7b49cf7d34544dc74bc2dffbe464a | b72266c166f4d0bec5871ed6e606cef6f9311dc9 | diff --git a/Cargo.lock b/Cargo.lock
index 4992691ebdc5..d8612618eac2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3035,7 +3035,7 @@ dependencies = [
[[package]]
name = "typst-dev-assets"
version = "0.14.2"
-source = "git+https://github.com/typst/typst-dev-assets?rev=3ec55c5#3ec55c5a14e519242a120e035d20725224e3e850"... | [
"Cargo.lock",
"Cargo.toml",
"docs/assets/docs.css",
"docs/assets/index.typ",
"docs/components/category.typ",
"docs/components/live.typ",
"docs/src/live.rs",
"docs/src/world.rs"
] | [
{
"comment": "I'm not sure why wrapping the content in `small` isn't sufficient to get the font size to be small enough.",
"path": "docs/components/category.typ",
"hunk": "@@ -233,6 +238,27 @@\n }\n }\n \n+// Displays a link to the sources for an item.\n+//\n+// Requires context.\n+#let sources-link(i... | true | |
typst/typst | 8,298 | comment_to_fix | Add links to sources in the documentation | I think I would prefer an `stdx.str-from-path` as you suggested | e45d37b333d7b49cf7d34544dc74bc2dffbe464a | b72266c166f4d0bec5871ed6e606cef6f9311dc9 | diff --git a/docs/components/live.typ b/docs/components/live.typ
index 5f89307db461..50d343fd7162 100644
--- a/docs/components/live.typ
+++ b/docs/components/live.typ
@@ -15,11 +15,11 @@
short-or-long: short-or-long,
)
-// Returns a dictionary with all live-loaded docs in the Rust file at the given
+// Returns a ... | [
"docs/components/live.typ"
] | [
{
"comment": "I think I would prefer an `stdx.str-from-path` as you suggested",
"path": "docs/components/live.typ",
"hunk": "@@ -54,3 +54,16 @@\n scope: scope,\n )\n }\n+\n+// Returns a GitHub permalink to the source of an item, including the commit and\n+// line number.\n+#let item-source-link(de... | true | ||
typst/typst | 8,298 | comment_to_fix | Add links to sources in the documentation | ```suggestion
#import "live.typ": live-docs, item-source-link
```
| e45d37b333d7b49cf7d34544dc74bc2dffbe464a | b72266c166f4d0bec5871ed6e606cef6f9311dc9 | diff --git a/docs/components/category.typ b/docs/components/category.typ
index be790305ad11..a6165c6dd77e 100644
--- a/docs/components/category.typ
+++ b/docs/components/category.typ
@@ -1,11 +1,12 @@
#import "system.typ": colors
#import "base.typ": (
classnames, deprecation, folding-details, heading-offset, label... | [
"docs/components/category.typ"
] | [
{
"comment": "```suggestion\n#import \"live.typ\": live-docs, item-source-link\n```\n",
"path": "docs/components/category.typ",
"hunk": "@@ -1,11 +1,12 @@\n #import \"system.typ\": colors\n #import \"base.typ\": (\n classnames, deprecation, folding-details, heading-offset, labelled, oneliner,\n- page... | true | ||
typst/typst | 8,298 | comment_to_fix | Add links to sources in the documentation | Merged https://github.com/typst/typst-dev-assets/pull/28, so this can be bumped. | e45d37b333d7b49cf7d34544dc74bc2dffbe464a | b72266c166f4d0bec5871ed6e606cef6f9311dc9 | diff --git a/Cargo.toml b/Cargo.toml
index e8dd0e3b43f1..44f4c87013ee 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -34,7 +34,7 @@ typst-syntax = { path = "crates/typst-syntax", version = "0.14.2" }
typst-timing = { path = "crates/typst-timing", version = "0.14.2" }
typst-utils = { path = "crates/typst-utils", version ... | [
"Cargo.toml"
] | [
{
"comment": "Merged https://github.com/typst/typst-dev-assets/pull/28, so this can be bumped.",
"path": "Cargo.toml",
"hunk": "@@ -34,11 +34,11 @@ typst-syntax = { path = \"crates/typst-syntax\", version = \"0.14.2\" }\n typst-timing = { path = \"crates/typst-timing\", version = \"0.14.2\" }\n typst-ut... | true | ||
typst/typst | 8,371 | issue_to_patch | Add `--pretty` CLI flag and minify HTML and SVG by default | Based on #8370
This changes the default output to be non-pretty (minimized).
The test suite still produces pretty output, which may be undesirable, we probably want to test a mix of both, but I don't wan to add more special cased test suite options like `pdf-standard`. Once the format options are settable we can ... | 44b3f78ed37fedea75e911dde2269ef86c45316f | 1d038ba01247dff9083bd743cfe5ac8ec3ca42f0 | diff --git a/Cargo.lock b/Cargo.lock
index 1054d5cb864c..cd5301f20901 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3481,6 +3481,7 @@ dependencies = [
"typst-library",
"typst-macros",
"typst-timing",
+ "typst-utils",
]
[[package]]
diff --git a/crates/typst-bundle/src/export.rs b/crates/typst-bundle/src/export.... | [
"Cargo.lock",
"crates/typst-bundle/src/export.rs",
"crates/typst-cli/src/args.rs",
"crates/typst-cli/src/compile.rs",
"crates/typst-html/src/encode.rs",
"crates/typst-html/src/lib.rs",
"crates/typst-pdf/src/convert.rs",
"crates/typst-pdf/src/lib.rs",
"crates/typst-pdf/src/metadata.rs",
"crates/typ... | [
{
"comment": "I feel like this should explain in more details what this means. In particular, listing the export formats for which this has an effect (I assume this has no effect with PNG export for example). That would clarify what this flag does.",
"path": "crates/typst-cli/src/args.rs",
"hunk": "@@ -... | diff --git a/tests/fuzz/src/bin/html.rs b/tests/fuzz/src/bin/html.rs
index 41e09c9db181..8af8d0ca1e24 100644
--- a/tests/fuzz/src/bin/html.rs
+++ b/tests/fuzz/src/bin/html.rs
@@ -2,12 +2,13 @@
use libfuzzer_sys::fuzz_target;
use typst_fuzz::FuzzWorld;
-use typst_html::HtmlDocument;
+use typst_html::{HtmlDocument, H... | true | |
typst/typst | 8,371 | comment_to_fix | Add `--pretty` CLI flag and minify HTML and SVG by default | I feel like this should explain in more details what this means. In particular, listing the export formats for which this has an effect (I assume this has no effect with PNG export for example). That would clarify what this flag does. | 44b3f78ed37fedea75e911dde2269ef86c45316f | 1d038ba01247dff9083bd743cfe5ac8ec3ca42f0 | diff --git a/crates/typst-cli/src/args.rs b/crates/typst-cli/src/args.rs
index e5375e594535..d514ae4aa054 100644
--- a/crates/typst-cli/src/args.rs
+++ b/crates/typst-cli/src/args.rs
@@ -319,6 +319,14 @@ pub struct CompileArgs {
#[clap(flatten)]
pub world: WorldArgs,
+ /// Whether to pretty-print produce... | [
"crates/typst-cli/src/args.rs"
] | [
{
"comment": "I feel like this should explain in more details what this means. In particular, listing the export formats for which this has an effect (I assume this has no effect with PNG export for example). That would clarify what this flag does.",
"path": "crates/typst-cli/src/args.rs",
"hunk": "@@ -... | true | ||
typst/typst | 8,371 | comment_to_fix | Add `--pretty` CLI flag and minify HTML and SVG by default | I think this could just be fully default. The bundle doesn't contain PNGs anyway. | 44b3f78ed37fedea75e911dde2269ef86c45316f | 1d038ba01247dff9083bd743cfe5ac8ec3ca42f0 | diff --git a/docs/src/main.rs b/docs/src/main.rs
index 30e73db7585d..c6d8540f6b07 100644
--- a/docs/src/main.rs
+++ b/docs/src/main.rs
@@ -182,7 +182,7 @@ fn export_website(mut bundle: Bundle, config: &Config) -> SourceResult<()> {
BundleFile::Asset(Bytes::new(serde_json::to_vec(&index).unwrap())),
);
-... | [
"docs/src/main.rs"
] | [
{
"comment": "I think this could just be fully default. The bundle doesn't contain PNGs anyway.",
"path": "docs/src/main.rs",
"hunk": "@@ -182,7 +184,13 @@ fn export_website(mut bundle: Bundle, config: &Config) -> SourceResult<()> {\n BundleFile::Asset(Bytes::new(serde_json::to_vec(&index).unwra... | true | ||
typst/typst | 8,371 | comment_to_fix | Add `--pretty` CLI flag and minify HTML and SVG by default | Yeah, I think it should, considering that it's the CLI's default. | 44b3f78ed37fedea75e911dde2269ef86c45316f | 1d038ba01247dff9083bd743cfe5ac8ec3ca42f0 | diff --git a/crates/typst-render/src/lib.rs b/crates/typst-render/src/lib.rs
index 59b9d5557a74..548325aaabc0 100644
--- a/crates/typst-render/src/lib.rs
+++ b/crates/typst-render/src/lib.rs
@@ -11,6 +11,7 @@ use typst_library::layout::{
Abs, Axes, Frame, FrameItem, FrameKind, GroupItem, Point, Sides, Size, Transf... | [
"crates/typst-render/src/lib.rs"
] | [
{
"comment": "Yeah, I think it should, considering that it's the CLI's default.",
"path": "crates/typst-render/src/lib.rs",
"hunk": "@@ -103,7 +105,11 @@ pub struct RenderOptions {\n \n impl Default for RenderOptions {\n fn default() -> Self {\n- Self { pixel_per_pt: 1.0, render_bleed: false ... | true | ||
typst/typst | 8,371 | comment_to_fix | Add `--pretty` CLI flag and minify HTML and SVG by default | ```suggestion
/// Whether to format the HTML in a human-readable way.
```
same for the other options | 44b3f78ed37fedea75e911dde2269ef86c45316f | 1d038ba01247dff9083bd743cfe5ac8ec3ca42f0 | diff --git a/crates/typst-html/src/encode.rs b/crates/typst-html/src/encode.rs
index f54d13ff8c85..6580fff9d781 100644
--- a/crates/typst-html/src/encode.rs
+++ b/crates/typst-html/src/encode.rs
@@ -12,10 +12,17 @@ use crate::{
tag,
};
+/// Settings for HTML export.
+#[derive(Debug, Default, Clone, Eq, PartialE... | [
"crates/typst-html/src/encode.rs"
] | [
{
"comment": "```suggestion\n /// Whether to format the HTML in a human-readable way.\n```\nsame for the other options",
"path": "crates/typst-html/src/encode.rs",
"hunk": "@@ -12,10 +12,17 @@ use crate::{\n tag,\n };\n \n+/// Settings for HTML export.\n+#[derive(Debug, Default, Clone, Eq, Partia... | true | ||
typst/typst | 8,371 | comment_to_fix | Add `--pretty` CLI flag and minify HTML and SVG by default | This function lived right below `export_pdf`, but for the others it doesn't really make sense. I would suggest either moving each below it's function or just moving all together as a block below all `export_...` functions. | 44b3f78ed37fedea75e911dde2269ef86c45316f | 1d038ba01247dff9083bd743cfe5ac8ec3ca42f0 | diff --git a/crates/typst-cli/src/compile.rs b/crates/typst-cli/src/compile.rs
index f898b8d1f7b3..f65ad5d30525 100644
--- a/crates/typst-cli/src/compile.rs
+++ b/crates/typst-cli/src/compile.rs
@@ -13,10 +13,13 @@ use typst::foundations::{Datetime, Smart};
use typst::layout::PageRanges;
use typst::syntax::Span;
use... | [
"crates/typst-cli/src/compile.rs"
] | [
{
"comment": "This function lived right below `export_pdf`, but for the others it doesn't really make sense. I would suggest either moving each below it's function or just moving all together as a block below all `export_...` functions.",
"path": "crates/typst-cli/src/compile.rs",
"hunk": "@@ -379,6 +38... | true | ||
typst/typst | 8,371 | comment_to_fix | Add `--pretty` CLI flag and minify HTML and SVG by default | Tbh, I could see dropping the lifetime here to get rid of it across the board. | 44b3f78ed37fedea75e911dde2269ef86c45316f | 1d038ba01247dff9083bd743cfe5ac8ec3ca42f0 | diff --git a/crates/typst-pdf/src/lib.rs b/crates/typst-pdf/src/lib.rs
index 51c4d6eb3b4f..f219e6c1aa6d 100644
--- a/crates/typst-pdf/src/lib.rs
+++ b/crates/typst-pdf/src/lib.rs
@@ -55,7 +55,7 @@ pub fn pdf_in_bundle(
/// Settings for PDF export.
#[derive(Debug, Hash)]
-pub struct PdfOptions<'a> {
+pub struct PdfO... | [
"crates/typst-pdf/src/lib.rs"
] | [
{
"comment": "Tbh, I could see dropping the lifetime here to get rid of it across the board.",
"path": "crates/typst-pdf/src/lib.rs",
"hunk": "",
"resolving_sha": "1d038ba01247dff9083bd743cfe5ac8ec3ca42f0",
"resolving_diff": "diff --git a/crates/typst-pdf/src/lib.rs b/crates/typst-pdf/src/lib.rs... | true | ||
typst/typst | 8,392 | issue_to_patch | Remove named lifetimes from `Settable::{get, get_cloned, resolve}` | The named lifetimes unnecessarily constrain these methods, although no current caller was limited by this.
I found these by looking for instances of the "known problem" in the [`elidable_lifetime_names` lint](https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names), that the lint ignores fu... | 44b3f78ed37fedea75e911dde2269ef86c45316f | fd70f2d3389adbd578afcac853bac68f88415938 | diff --git a/crates/typst-library/src/foundations/content/field.rs b/crates/typst-library/src/foundations/content/field.rs
index f2f4ca6b849f..8d336bfa5b57 100644
--- a/crates/typst-library/src/foundations/content/field.rs
+++ b/crates/typst-library/src/foundations/content/field.rs
@@ -256,7 +256,7 @@ pub struct Settab... | [
"crates/typst-library/src/foundations/content/field.rs"
] | [] | true | ||
typst/typst | 8,401 | issue_to_patch | Page headers no longer work at all in accessible documents after recent Krilla update
### Description
The document
```typst
#set document(
title: "Bug with accessible headers"
)
#set page(
header: [aaa]
)
#title()
#lorem(20)
```
produces the following error when using PDF/UA-1 as the output format:
```sh
error... | Bump krilla to latest patch release | Closes https://github.com/typst/typst/issues/8383 | 44b3f78ed37fedea75e911dde2269ef86c45316f | cac9f206bf4ce5ad231c41729ec65f93b967d2d8 | diff --git a/Cargo.lock b/Cargo.lock
index 7633b54c8119..af3218ce3cb9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1506,9 +1506,9 @@ dependencies = [
[[package]]
name = "krilla"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0cd0ba7aeea683d25d7d9... | [
"Cargo.lock",
"Cargo.toml",
"tests/ref/pdf/hashes.txt",
"tests/suite/pdf/validation.typ"
] | [] | diff --git a/tests/ref/pdf/hashes.txt b/tests/ref/pdf/hashes.txt
index 0e3517de890b..bb4a0d1f6359 100644
--- a/tests/ref/pdf/hashes.txt
+++ b/tests/ref/pdf/hashes.txt
@@ -834,6 +834,7 @@ c538aeef16ca92d3fb2507ec32bf024d issue-80-emoji-linebreak
48356f3f3fa5243087fe38356bd16b9a issue-8261-string-as-ellipsis
6848c65a5c... | true |
typst/typst | 6,761 | issue_to_patch | Add `typst info` command that emits binary and environment information | While I couldn't find an issue for this, a few people have already asked for the ability to ask Typst directly about the paths it uses (namely the package paths). For example, to correctly cache packages in CI workflows without relying on possibly outdated scripts that duplicate the behavior of Typst's package path fal... | 4c27710b8aa957f84b3dd0ef78d152c07b47ce9a | 8a1d5d52f421414dd1923220000bdc279870f854 | diff --git a/crates/typst-cli/Cargo.toml b/crates/typst-cli/Cargo.toml
index dcc4af8680fe..b06eeb28d0f3 100644
--- a/crates/typst-cli/Cargo.toml
+++ b/crates/typst-cli/Cargo.toml
@@ -28,7 +28,7 @@ typst-render = { workspace = true }
typst-svg = { workspace = true }
typst-timing = { workspace = true }
chrono = { work... | [
"crates/typst-cli/Cargo.toml",
"crates/typst-cli/build.rs",
"crates/typst-cli/src/args.rs",
"crates/typst-cli/src/info.rs",
"crates/typst-cli/src/main.rs",
"crates/typst-cli/src/query.rs",
"crates/typst-kit/src/package.rs",
"flake.nix"
] | [
{
"comment": "could you sort these imports?",
"path": "crates/typst-cli/src/info.rs",
"hunk": "@@ -0,0 +1,525 @@\n+use std::env::VarError;\n+use std::fmt::Display;\n+use std::io::{self, Write};\n+use std::path::{Path, PathBuf};\n+\n+use crate::CliArguments;\n+use crate::terminal::{self, TermOut};\n+use ... | true | ||
typst/typst | 6,761 | comment_to_fix | Add `typst info` command that emits binary and environment information | could you sort these imports? | 4c27710b8aa957f84b3dd0ef78d152c07b47ce9a | 8a1d5d52f421414dd1923220000bdc279870f854 | diff --git a/crates/typst-cli/src/info.rs b/crates/typst-cli/src/info.rs
new file mode 100644
index 000000000000..b475500d9f3f
--- /dev/null
+++ b/crates/typst-cli/src/info.rs
@@ -0,0 +1,565 @@
+use std::env::VarError;
+use std::fmt::Display;
+use std::io::{self, Write};
+use std::path::{Path, PathBuf};
+
+use clap::bu... | [
"crates/typst-cli/src/info.rs"
] | [
{
"comment": "could you sort these imports?",
"path": "crates/typst-cli/src/info.rs",
"hunk": "@@ -0,0 +1,525 @@\n+use std::env::VarError;\n+use std::fmt::Display;\n+use std::io::{self, Write};\n+use std::path::{Path, PathBuf};\n+\n+use crate::CliArguments;\n+use crate::terminal::{self, TermOut};\n+use ... | true | ||
typst/typst | 6,761 | comment_to_fix | Add `typst info` command that emits binary and environment information | perhaps these should be unix without macOS rather than linux? | 4c27710b8aa957f84b3dd0ef78d152c07b47ce9a | 8a1d5d52f421414dd1923220000bdc279870f854 | diff --git a/crates/typst-cli/src/info.rs b/crates/typst-cli/src/info.rs
new file mode 100644
index 000000000000..b475500d9f3f
--- /dev/null
+++ b/crates/typst-cli/src/info.rs
@@ -0,0 +1,565 @@
+use std::env::VarError;
+use std::fmt::Display;
+use std::io::{self, Write};
+use std::path::{Path, PathBuf};
+
+use clap::bu... | [
"crates/typst-cli/src/info.rs"
] | [
{
"comment": "perhaps these should be unix without macOS rather than linux?",
"path": "crates/typst-cli/src/info.rs",
"hunk": "@@ -0,0 +1,525 @@\n+use std::env::VarError;\n+use std::fmt::Display;\n+use std::io::{self, Write};\n+use std::path::{Path, PathBuf};\n+\n+use crate::CliArguments;\n+use crate::t... | true | ||
typst/typst | 6,761 | comment_to_fix | Add `typst info` command that emits binary and environment information | this shoud also be unix without macOS I think | 4c27710b8aa957f84b3dd0ef78d152c07b47ce9a | 8a1d5d52f421414dd1923220000bdc279870f854 | diff --git a/crates/typst-cli/src/info.rs b/crates/typst-cli/src/info.rs
new file mode 100644
index 000000000000..b475500d9f3f
--- /dev/null
+++ b/crates/typst-cli/src/info.rs
@@ -0,0 +1,565 @@
+use std::env::VarError;
+use std::fmt::Display;
+use std::io::{self, Write};
+use std::path::{Path, PathBuf};
+
+use clap::bu... | [
"crates/typst-cli/src/info.rs"
] | [
{
"comment": "this shoud also be unix without macOS I think",
"path": "crates/typst-cli/src/info.rs",
"hunk": "@@ -0,0 +1,525 @@\n+use std::env::VarError;\n+use std::fmt::Display;\n+use std::io::{self, Write};\n+use std::path::{Path, PathBuf};\n+\n+use crate::CliArguments;\n+use crate::terminal::{self, ... | true | ||
typst/typst | 6,761 | comment_to_fix | Add `typst info` command that emits binary and environment information | let's maybe move this above the OS-specific ones | 4c27710b8aa957f84b3dd0ef78d152c07b47ce9a | 8a1d5d52f421414dd1923220000bdc279870f854 | diff --git a/crates/typst-cli/src/info.rs b/crates/typst-cli/src/info.rs
new file mode 100644
index 000000000000..b475500d9f3f
--- /dev/null
+++ b/crates/typst-cli/src/info.rs
@@ -0,0 +1,565 @@
+use std::env::VarError;
+use std::fmt::Display;
+use std::io::{self, Write};
+use std::path::{Path, PathBuf};
+
+use clap::bu... | [
"crates/typst-cli/src/info.rs"
] | [
{
"comment": "let's maybe move this above the OS-specific ones",
"path": "crates/typst-cli/src/info.rs",
"hunk": "@@ -0,0 +1,525 @@\n+use std::env::VarError;\n+use std::fmt::Display;\n+use std::io::{self, Write};\n+use std::path::{Path, PathBuf};\n+\n+use crate::CliArguments;\n+use crate::terminal::{sel... | true | ||
typst/typst | 6,761 | comment_to_fix | Add `typst info` command that emits binary and environment information | Maybe `CliFeature` should be renamed to `RuntimeFeature` or be kept as just `Feature` | 4c27710b8aa957f84b3dd0ef78d152c07b47ce9a | 8a1d5d52f421414dd1923220000bdc279870f854 | diff --git a/crates/typst-cli/src/info.rs b/crates/typst-cli/src/info.rs
new file mode 100644
index 000000000000..b475500d9f3f
--- /dev/null
+++ b/crates/typst-cli/src/info.rs
@@ -0,0 +1,565 @@
+use std::env::VarError;
+use std::fmt::Display;
+use std::io::{self, Write};
+use std::path::{Path, PathBuf};
+
+use clap::bu... | [
"crates/typst-cli/src/info.rs"
] | [
{
"comment": "Maybe `CliFeature` should be renamed to `RuntimeFeature` or be kept as just `Feature`",
"path": "crates/typst-cli/src/info.rs",
"hunk": "@@ -0,0 +1,525 @@\n+use std::env::VarError;\n+use std::fmt::Display;\n+use std::io::{self, Write};\n+use std::path::{Path, PathBuf};\n+\n+use crate::CliA... | true | ||
uNetworking/uWebSockets | 1,925 | issue_to_patch | Switch error message strings to constexpr | This changes their linkage so that files which include this header will avoid having unnecessary static global constructors.
(Similar to https://github.com/uNetworking/uWebSockets/pull/1828.) | 8dd7fcbc4339e6c8ce26732ef6237ebaf4504e9a | e50410a03c7ae62647fd0c09760e74cdb4ac84d3 | diff --git a/src/HttpErrors.h b/src/HttpErrors.h
index a17a1c737..28a1354a4 100644
--- a/src/HttpErrors.h
+++ b/src/HttpErrors.h
@@ -31,7 +31,7 @@ enum HttpError {
#ifndef UWS_HTTPRESPONSE_NO_WRITEMARK
/* Returned parser errors match this LUT. */
-static const std::string_view httpErrorResponses[] = {
+static const... | [
"src/HttpErrors.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,828 | issue_to_patch | Switch error message strings to constexpr | This changes their linkage so that files which include this header will avoid having unnecessary static global constructors. | 2e78447c62d4abaf0a368876b31e3b66386bdf64 | 743df1c1b78f06503df6c65f29c09eb50844ce7a | diff --git a/src/WebSocketProtocol.h b/src/WebSocketProtocol.h
index a37120d29..15d57a91c 100644
--- a/src/WebSocketProtocol.h
+++ b/src/WebSocketProtocol.h
@@ -28,13 +28,13 @@
namespace uWS {
/* We should not overcomplicate these */
-const std::string_view ERR_TOO_BIG_MESSAGE("Received too big message");
-const st... | [
"src/WebSocketProtocol.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,921 | issue_to_patch | adoptSocket: add optional ip parameter | Related to uWS.js issue [1257](https://github.com/uNetworking/uWebSockets.js/issues/1257).
Depends on uSockets PR [251](https://github.com/uNetworking/uSockets/pull/251).
Update `adoptSocket()` to accept an optional IP parameter.
Update LocalCluster and `addChildApp()` to retrieve the IP on pre_open and pass it to... | 360c276d609d59af56ae6932adb95154ace9f15f | 8fa5d5ac466ec88115dc257032d68757fab45e64 | diff --git a/src/App.h b/src/App.h
index 9a59c072d..35be67343 100644
--- a/src/App.h
+++ b/src/App.h
@@ -593,7 +593,7 @@ struct TemplatedApp {
}
/* Register event handler for accepted FD. Can be used together with adoptSocket. */
- TemplatedApp &&preOpen(LIBUS_SOCKET_DESCRIPTOR (*handler)(struct us_socke... | [
"src/App.h",
"src/HttpContext.h",
"src/LocalCluster.h"
] | [
{
"comment": "You don't want std::vector for 16 bytes, use std::array<17>",
"path": "src/App.h",
"hunk": "@@ -634,9 +634,9 @@ struct TemplatedApp {\n //std::cout << \"Loop is \" << receivingApp->getLoop() << std::endl;\n \n \n- receivingApp->getLoop()->defer([fd, receivingApp]() {... | true | ||
uNetworking/uWebSockets | 1,921 | comment_to_fix | adoptSocket: add optional ip parameter | You don't want std::vector for 16 bytes, use std::array<17> | 360c276d609d59af56ae6932adb95154ace9f15f | 8fa5d5ac466ec88115dc257032d68757fab45e64 | diff --git a/src/App.h b/src/App.h
index 9a59c072d..35be67343 100644
--- a/src/App.h
+++ b/src/App.h
@@ -593,7 +593,7 @@ struct TemplatedApp {
}
/* Register event handler for accepted FD. Can be used together with adoptSocket. */
- TemplatedApp &&preOpen(LIBUS_SOCKET_DESCRIPTOR (*handler)(struct us_socke... | [
"src/App.h"
] | [
{
"comment": "You don't want std::vector for 16 bytes, use std::array<17>",
"path": "src/App.h",
"hunk": "@@ -634,9 +634,9 @@ struct TemplatedApp {\n //std::cout << \"Loop is \" << receivingApp->getLoop() << std::endl;\n \n \n- receivingApp->getLoop()->defer([fd, receivingApp]() {... | true | ||
uNetworking/uWebSockets | 1,923 | issue_to_patch | Bump uSockets submodule to latest upstream and align API surface | This PR updates the `uSockets` submodule to a newer upstream revision to resolve interface drift between uWebSockets and its transport layer. The previous pinned revision was behind recent API changes (notably `on_pre_open`), causing integration breakage.
- **Submodule update**
- Advances `uSockets` gitlink from `ae... | a5c26acb5c84ad0dc9145f1ce34ee3c437c1e59b | b40afdf45eddbe0e77fa2fdcfe3d2787c321943d | diff --git a/uSockets b/uSockets
index ae52d1ede..86097c490 160000
--- a/uSockets
+++ b/uSockets
@@ -1,1 +1,1 @@
-Subproject commit ae52d1edea0182de655bde4d445858b3b02d6219
+Subproject commit 86097c490263ab662d62e8e7b541390bdec7d149
| [
"uSockets"
] | [] | true | ||
uNetworking/uWebSockets | 1,917 | issue_to_patch | Add UWS_REMOTE_ADDRESS_USERSPACE macro for userspace remote address caching | When `UWS_REMOTE_ADDRESS_USERSPACE` is defined, the remote IP is cached in per-socket data at connection time (from the `on_open` arguments) rather than retrieved via syscall on each `getRemoteAddress()` call.
### Changes
- **`AsyncSocketData`** — adds `char remoteAddress[16]` and `int remoteAddressLength` fields, gu... | 8956c971e477dd3f1e7cdefff4b5d873eeecea2e | 7dd40ff707e2b1240ba59a2ce5f4d517bf28f13a | diff --git a/src/AsyncSocket.h b/src/AsyncSocket.h
index 3c991f93e..1d8fc9fed 100644
--- a/src/AsyncSocket.h
+++ b/src/AsyncSocket.h
@@ -219,10 +219,15 @@ struct AsyncSocket {
/* Returns the remote IP address or empty string on failure */
std::string_view getRemoteAddress() {
+#ifdef UWS_REMOTE_ADDRESS_USER... | [
"src/AsyncSocket.h",
"src/AsyncSocketData.h",
"src/HttpContext.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,914 | issue_to_patch | Strange issue with simple code
Hello. When accidentally written as:
```C++
uWS::App app = uWS::App();
```
The server freezes on input connections. When written as:
```C++
uWS::App app;
```
Everything works correctly.
Perhaps the App object shouldn't be moveable or something? | Fix rule-of-5 for uApp | The uApp defines copy/move constructors but not assign operators. This violates the rule of 3/5.
Fixes #1905 | 7b38a1f238c9434ea392caa1b1e55dd5d1c16915 | 8634e5e509e8673de1fcaadf5cf85f262751e09b | diff --git a/src/App.h b/src/App.h
index 7fa9319a6..9a59c072d 100644
--- a/src/App.h
+++ b/src/App.h
@@ -239,6 +239,15 @@ struct TemplatedApp {
});
}
+ TemplatedApp& operator=(const TemplatedApp&) = delete;
+
+ TemplatedApp& operator=(TemplatedApp&& other) {
+ std::swap(this->httpContext, o... | [
"src/App.h"
] | [] | true | |
uNetworking/uWebSockets | 1,913 | issue_to_patch | Add `maxRemainingBodyLength()` getter to `HttpResponse` | `HttpParser` tracks remaining body bytes in `remainingStreamingBytes` but exposed no public API to read it. This adds a `remainingBodyLength()` getter accessible via `HttpResponse`.
## Changes
- **`HttpParser`**: New public `remainingBodyLength()` method — returns `remainingStreamingBytes` for content-length requests... | c7b37fc1a3f15a88a5ab77560ffd854da7075b15 | a1ef0922c66d8d365dd7e817caf97c57f075e18a | diff --git a/src/HttpParser.h b/src/HttpParser.h
index 7a4c563b6..0605e211f 100644
--- a/src/HttpParser.h
+++ b/src/HttpParser.h
@@ -615,6 +615,14 @@ struct HttpParser {
}
public:
+ /* Returns the remaining body length if set via content-length, UINT64_MAX if transfer-encoding is chunked, or 0 if no body */
... | [
"src/HttpParser.h",
"src/HttpResponse.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,854 | issue_to_patch | Expose remote port api | Exposes the remote socket port to the upper layers
Should be merged before pull request: https://github.com/uNetworking/uWebSockets.js/pull/1162
Related to issue: https://github.com/uNetworking/uWebSockets.js/issues/1160 | d437169851a21785c7c3beaaeb5cb83c88665230 | 261f3b991862b14ee4625195e678d9bc1b04ea20 | diff --git a/src/AsyncSocket.h b/src/AsyncSocket.h
index 5b6c64747..3c991f93e 100644
--- a/src/AsyncSocket.h
+++ b/src/AsyncSocket.h
@@ -230,6 +230,12 @@ struct AsyncSocket {
return addressAsText(getRemoteAddress());
}
+ /* Returns the remote port number or -1 on failure */
+ unsigned int getRemot... | [
"src/AsyncSocket.h",
"src/HttpResponse.h",
"src/ProxyParser.h",
"src/WebSocket.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,395 | issue_to_patch | added more c apis and capi ssl version with capi examples | This adds a complete useful capi with ssl suport and most examples added.
It's a step to solve this issue: https://github.com/uNetworking/uWebSockets/issues/1192
[Opaque C interface for Swift, Rust, etc](https://github.com/uNetworking/uWebSockets/issues/1192)
For now its just a wrapper and can be optimized a lot... | 83c54aa0965c2b52c759355b4aa1a09a93672c65 | d38dbd88348d42292f5c2c4ab7daf9b5aa1bb657 | diff --git a/capi/App.cpp b/capi/App.cpp
deleted file mode 100644
index 2b18ad993..000000000
--- a/capi/App.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-#include "libuwebsockets.h"
-#include "App.h"
-
-extern "C" {
-
- uws_app_t *uws_create_app() {
- return (uws_app_t *) new uWS::App();
- }
-
- void uws_app_get(... | [
"capi/App.cpp",
"capi/Makefile",
"capi/example.c",
"capi/example.rs",
"capi/examples/Broadcast.c",
"capi/examples/BroadcastEchoServer.c",
"capi/examples/EchoServer.c",
"capi/examples/HelloWorld.c",
"capi/examples/HelloWorldAsync.c",
"capi/examples/RustHelloWorld.rs",
"capi/examples/ServerName.c"... | [] | true | ||
uNetworking/uWebSockets | 1,870 | issue_to_patch | add enable simd utf8 macro | add enable simd utf8 macro | 000d9fead658ad950790eda48aae2c56ff4447ab | 9ccf11ca9d22e7afd2097962914dbe7442792c5a | diff --git a/src/WebSocketProtocol.h b/src/WebSocketProtocol.h
index 15d57a91c..9aa79e229 100644
--- a/src/WebSocketProtocol.h
+++ b/src/WebSocketProtocol.h
@@ -25,6 +25,10 @@
#include <cstdlib>
#include <string_view>
+#ifdef UWS_USE_SIMDUTF
+ #include <simdutf.h>
+#endif
+
namespace uWS {
/* We should not ove... | [
"src/WebSocketProtocol.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,862 | issue_to_patch | Less undefined behavior way of doing byte swap | For C++ reading from an inactive member of an union is technically undefined behavior. This also gets rid of the warning that MSVC was throwing about dst being potentially uninitialized variable being used.
Both versions compile down to the same assembly code, https://godbolt.org/z/cWbEnWYqM, with C++20 this could b... | c8da12b537516489b2e01dacf4d836b5bc74e826 | 3cd236540d1b0425a966657978f7ce388059767b | diff --git a/src/WebSocketProtocol.h b/src/WebSocketProtocol.h
index 15d57a91c..d4b1af07b 100644
--- a/src/WebSocketProtocol.h
+++ b/src/WebSocketProtocol.h
@@ -95,18 +95,20 @@ T bit_cast(char *c) {
/* Byte swap for little-endian systems */
template <typename T>
T cond_byte_swap(T value) {
+ static_assert(std::is... | [
"src/WebSocketProtocol.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,829 | issue_to_patch | Update Example Code |

ping , pong handler should give std::string_view message argument.
Otherwise, it throws error when compiling.
.ws<PerSocketData>("/*", {
.drain = [](auto *ws) {
/* Check getBufferedAmount here */
},
- .ping = [](auto *ws) {
+ .ping = [](auto *w... | [
"misc/READMORE.md"
] | [] | true | ||
uNetworking/uWebSockets | 1,792 | issue_to_patch | add buffer.shrink_to_fit() to reduce memory | add buffer.shrink_to_fit() to reduce memory when clear buffer. | 600e7fe0faf74fb54722720a6d2e3f545d99f548 | 0ce29a1b885cc68293c64aeecffb6695050432bc | diff --git a/src/AsyncSocketData.h b/src/AsyncSocketData.h
index b72b2c101..85fbb6880 100644
--- a/src/AsyncSocketData.h
+++ b/src/AsyncSocketData.h
@@ -47,6 +47,7 @@ struct BackPressure {
void clear() {
pendingRemoval = 0;
buffer.clear();
+ buffer.shrink_to_fit();
}
void reserve... | [
"src/AsyncSocketData.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,742 | issue_to_patch | Update user manual | Fix typo in user manual. | 600e7fe0faf74fb54722720a6d2e3f545d99f548 | 6d698dd22339a89b8e110687217685594b18a6fe | diff --git a/misc/READMORE.md b/misc/READMORE.md
index 93fde858b..451ca8369 100644
--- a/misc/READMORE.md
+++ b/misc/READMORE.md
@@ -105,7 +105,7 @@ That's why your sockets will be corked by default in most simple cases, includin
You can make sure corking is enabled, even for cases where default corking would be enabl... | [
"misc/READMORE.md"
] | [] | true | ||
uNetworking/uWebSockets | 1,712 | issue_to_patch | AsyncFileStreamer typo | Typo in AsyncFileStreamer.h | 600e7fe0faf74fb54722720a6d2e3f545d99f548 | f1d5441e22ac1c6b03955a5b6e750c080694a1b7 | diff --git a/examples/helpers/AsyncFileStreamer.h b/examples/helpers/AsyncFileStreamer.h
index e29d49388..e99be8b6f 100644
--- a/examples/helpers/AsyncFileStreamer.h
+++ b/examples/helpers/AsyncFileStreamer.h
@@ -38,7 +38,7 @@ struct AsyncFileStreamer {
static void streamFile(uWS::HttpResponse<SSL> *res, AsyncFile... | [
"examples/helpers/AsyncFileStreamer.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,797 | issue_to_patch | Update TopicTree.h to include missing header file for std::terminate | Missing header file "exception". This causes a compiler error on at least MacOS when including the Websocket.h header file. | 5b6d6858fcc829f2c6e77ea48502c80bc5385606 | 5fb064a67203b98cdbe8c602c576a3bd4c3d405f | diff --git a/src/TopicTree.h b/src/TopicTree.h
index 88788a697..67a9a1613 100644
--- a/src/TopicTree.h
+++ b/src/TopicTree.h
@@ -30,6 +30,7 @@
#include <functional>
#include <set>
#include <string>
+#include <exception>
namespace uWS {
| [
"src/TopicTree.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,790 | issue_to_patch | add feature test for __cpp_lib_move_only_function | This fixes some warnings about the depreciation of std::aligned_storage when compiling using c++23 | 635180732ff9e1b380da7623dd23a2caf16843bd | 3dfa3bc5ab19dfb7ee8794a97e26f5a7a35c57a8 | diff --git a/src/MoveOnlyFunction.h b/src/MoveOnlyFunction.h
index b1ae785e2..c767aaf40 100644
--- a/src/MoveOnlyFunction.h
+++ b/src/MoveOnlyFunction.h
@@ -28,6 +28,9 @@ SOFTWARE.
#define _ANY_INVOKABLE_H_
#include <functional>
+
+#if !defined(__cpp_lib_move_only_function) || __cpp_lib_move_only_function < 202110L... | [
"src/MoveOnlyFunction.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,786 | issue_to_patch | Add missing include cstdint in BloomFilter.h | `BloomFilter.h` uses `int32_t`, so it needs to include the `cstdint` header. | 17b8f957211c937e38bc2cc4c194cbcc94aaaee6 | f8030352a33ac379488fa9d38e5b616e539facff | diff --git a/src/BloomFilter.h b/src/BloomFilter.h
index a98cc395d..12d29e616 100644
--- a/src/BloomFilter.h
+++ b/src/BloomFilter.h
@@ -21,6 +21,7 @@
/* This filter has no false positives or collisions for the standard
* and non-standard common request headers */
+#include <cstdint>
#include <string_view>
#incl... | [
"src/BloomFilter.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,783 | issue_to_patch | Removed unused assignment to temporary argument in BloomFilter | 5dda4afb5c33ef92206fb3f6bf2384d1f199e486 | 238375779d068dc24e5b6a25c1de40b997aff6c1 | diff --git a/src/BloomFilter.h b/src/BloomFilter.h
index 5d2398eb4..a98cc395d 100644
--- a/src/BloomFilter.h
+++ b/src/BloomFilter.h
@@ -30,7 +30,7 @@ struct BloomFilter {
private:
std::bitset<256> filter;
static inline uint32_t perfectHash(uint32_t features) {
- return features *= 1843993368;
+ ... | [
"src/BloomFilter.h"
] | [] | true | |||
uNetworking/uWebSockets | 1,782 | issue_to_patch | Move deletion of topicTree to after use of the pointer in removePre/PostHandler | This fails clang-tidy and is probably a reasonable thing to change | 388e2b3364ffcd4bc2c57a73166ecfde8fc1875d | 8e1fed20fa5522cbb9ca1b5862867a02169ce01c | diff --git a/src/App.h b/src/App.h
index d0cac7f42..c16798e95 100644
--- a/src/App.h
+++ b/src/App.h
@@ -189,12 +189,12 @@ struct TemplatedApp {
/* Delete TopicTree */
if (topicTree) {
- delete topicTree;
-
/* And unregister loop callbacks */
/* We must unregiste... | [
"src/App.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,775 | issue_to_patch | fix typo | 9bbf161a72db2a38a3741005d43801fb1f65cbbb | 90a4926f6108c393adc8671e7d4c6e06b123510f | diff --git a/src/AsyncSocket.h b/src/AsyncSocket.h
index d8283c9bf..bf7b50a7b 100644
--- a/src/AsyncSocket.h
+++ b/src/AsyncSocket.h
@@ -141,7 +141,7 @@ struct AsyncSocket {
getLoopData()->corkedSocket = this;
}
- /* Returns wheter we are corked or not */
+ /* Returns whether we are corked or not ... | [
"src/AsyncSocket.h"
] | [] | true | |||
uNetworking/uWebSockets | 1,761 | issue_to_patch | Replace unnecessary lambda for close event | The lambda is simply a wrapper to destruct UserData, which can instead be done by the caller, removing the need for it. In this case we also destruct UserData even if closeHandler is null, which would not have been done before. | c682365210c7869399947404f6d79e110b3e4da8 | 3fc21c5b64d073a2eec7f60527a46a2cff2cae65 | diff --git a/src/App.h b/src/App.h
index f0e2a4dc3..0ed923ce6 100644
--- a/src/App.h
+++ b/src/App.h
@@ -382,14 +382,7 @@ struct TemplatedApp {
webSocketContext->getExt()->droppedHandler = std::move(behavior.dropped);
webSocketContext->getExt()->drainHandler = std::move(behavior.drain);
webSo... | [
"src/App.h",
"src/WebSocket.h",
"src/WebSocketContext.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,759 | issue_to_patch | added a space between CXX and Flags causing build issue | 0d4346037fa2b933132b23b8f2cfc8a1bfddf69f | 7d30bd0604025aa8e3ae2ee1f1ccb17ea5e03340 | diff --git a/build.c b/build.c
index 001615420..445bdc42b 100644
--- a/build.c
+++ b/build.c
@@ -74,7 +74,7 @@ int main(int argc, char **argv) {
if (!strcmp(argv[1], "examples")) {
for (int i = 0; i < sizeof(EXAMPLE_FILES) / sizeof(char *); i++) {
- if (run("%s%s examples/%s.cpp %s -o %s%s", ... | [
"build.c"
] | [] | true | |||
uNetworking/uWebSockets | 1,697 | issue_to_patch | Feature / Adopt externally accepted sockets into uWebSockets. | # Description
This allows for sockets that were obtained from an external `accept(2)` to be adopted into uWebSockets.
Such sockets may come from another library, another external event-loop, or from a forked-server pattern, like [inetd](https://en.wikipedia.org/wiki/Inetd), [systemd-socket-activate](https://www.... | 97a72ed31f1846b9fff4e95b6442c620ab62d83e | c17fd67911bcb56e7a9c705da3e931822560592f | diff --git a/src/App.h b/src/App.h
index 10ca423c4..904e218a9 100644
--- a/src/App.h
+++ b/src/App.h
@@ -575,6 +575,12 @@ struct TemplatedApp {
return std::move(*this);
}
+ /* adopt an externally accepted socket */
+ TemplatedApp &&adoptSocket(LIBUS_SOCKET_DESCRIPTOR accepted_fd) {
+ httpCo... | [
"src/App.h",
"src/HttpContext.h",
"uSockets"
] | [] | true | ||
uNetworking/uWebSockets | 1,687 | issue_to_patch | Fix uws_res_resume() API to call resume() instead of pause() | I have tried out this fix and it seems to make the pause/resume functionality work correctly. Addresses #1686 Thank you for considering it! | 4f04979f9ec6a02fff2b5fb8bd1b9c9650444d8a | 2df9a5d4135e373ebfbbce1a9ab0bb30172da5e5 | diff --git a/capi/libuwebsockets.cpp b/capi/libuwebsockets.cpp
index 80eba4081..4f1754e79 100644
--- a/capi/libuwebsockets.cpp
+++ b/capi/libuwebsockets.cpp
@@ -1059,12 +1059,12 @@ extern "C"
if (ssl)
{
uWS::HttpResponse<true> *uwsRes = (uWS::HttpResponse<true> *)res;
- uwsRes-... | [
"capi/libuwebsockets.cpp"
] | [] | true | ||
uNetworking/uWebSockets | 1,613 | issue_to_patch | Silence unused variable warning | Simple fix as described, silences the only unused variable warning | d5ec941fd8d29f3df6afbc73164d3c8bf0f49079 | fee48e977d4e9699fa2b90406c44600bf6721191 | diff --git a/src/WebSocket.h b/src/WebSocket.h
index f20948111..f90c195a3 100644
--- a/src/WebSocket.h
+++ b/src/WebSocket.h
@@ -245,6 +245,8 @@ struct WebSocket : AsyncSocket<SSL> {
/* There is no timeout when failing to uncork for WebSockets,
* as that is handled by idleTimeout */
... | [
"src/WebSocket.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,667 | issue_to_patch | Add uws_app_close function to CAPI | Hello!
This PR adds `uws_app_close` function to the C API, which is call native app `close` method.
Please, consider to merge. | 143db3034f361a5c1d57bb3179a9b100ab6396ab | 58b25caf6e750cda5c63024088c3c350c9ffd180 | diff --git a/capi/libuwebsockets.cpp b/capi/libuwebsockets.cpp
index a332e8eff..80eba4081 100644
--- a/capi/libuwebsockets.cpp
+++ b/capi/libuwebsockets.cpp
@@ -408,6 +408,20 @@ extern "C"
uwsApp->domain(std::string(server_name, server_name_length));
}
}
+ void uws_app_close(int ssl, uws_a... | [
"capi/libuwebsockets.cpp",
"capi/libuwebsockets.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,662 | issue_to_patch | Don't lose ws frame payload when its header went to backpressure | WS frame payload was errorneously lost in the shortcut branch of `WebSocket::send(std::string_view message, OpCode opCode, bool compress, bool fin)`, which resulted in incorrect byte sequences being sent on the wire. This PR fixes the bug. | f1b10ed221b36c0d8848998e3e939823f66496eb | 831cfdc7d7c591c6df0c10de08905c87b88da2e1 | diff --git a/src/WebSocket.h b/src/WebSocket.h
index f90c195a3..23c9bbe5b 100644
--- a/src/WebSocket.h
+++ b/src/WebSocket.h
@@ -118,6 +118,7 @@ struct WebSocket : AsyncSocket<SSL> {
webSocketData->buffer.append(message.data() + written - header_length, message.length() - (size_t) (written - header... | [
"src/WebSocket.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,653 | issue_to_patch | Message inflation may overwrite the header of the next packet
`WebsocketContext::handleFragment()` often hands the `data` buffer it receives directly to the inflation stream for decompression. The inflation stream modifies this array in-place to append the tail/padding bytes before handing it off to `zlib`. However, s... | Restore the bytes overwritten by the tail after inflation | Fixes https://github.com/uNetworking/uWebSockets/issues/1650 | 3bb917da2e44f36a5fec32d735cb61839fe1cc6c | f56ed71346098697fa7635bded45621f48e4882b | diff --git a/src/PerMessageDeflate.h b/src/PerMessageDeflate.h
index 70fea17b6..17832c716 100644
--- a/src/PerMessageDeflate.h
+++ b/src/PerMessageDeflate.h
@@ -245,9 +245,14 @@ struct InflationStream {
}
#endif
+ /* Save off the bytes we're about to overwrite */
+ char* tailLocation = (char*)... | [
"src/PerMessageDeflate.h"
] | [] | true | |
uNetworking/uWebSockets | 1,630 | issue_to_patch | warning: 'sprintf' is deprecated from macOS
```sh
src/AsyncSocket.h:215:24: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]... | #1617 fix warning: 'sprintf' is deprecated from macOS | try fix https://github.com/uNetworking/uWebSockets/issues/1617 | 7568327834020f2ceed3ce2a823f23d0cc18cb8c | fa45a2a58ec0d666c6c047c0fe96fd77f53dddf5 | diff --git a/src/AsyncSocket.h b/src/AsyncSocket.h
index 7a9360817..6770974da 100644
--- a/src/AsyncSocket.h
+++ b/src/AsyncSocket.h
@@ -212,9 +212,9 @@ struct AsyncSocket {
unsigned char *b = (unsigned char *) binary.data();
if (binary.length() == 4) {
- ipLength = sprintf(buf, "%u.%u.%u... | [
"src/AsyncSocket.h"
] | [] | true | |
uNetworking/uWebSockets | 1,397 | issue_to_patch | use SocketContextOptions type so HttpServer example will build again | c9724db3cff5a942f0accabb2d795f8becefb594 | bde35a3f56fb46af285084713f8f06bccbec51a6 | diff --git a/examples/HttpServer.cpp b/examples/HttpServer.cpp
index 6c72bdff1..ecf1c7361 100644
--- a/examples/HttpServer.cpp
+++ b/examples/HttpServer.cpp
@@ -28,7 +28,7 @@ int main(int argc, char **argv) {
};
int port = 3000;
- struct us_socket_context_options_t ssl_options = {};
+ uWS::SocketConte... | [
"examples/HttpServer.cpp"
] | [] | true | |||
uNetworking/uWebSockets | 1,626 | issue_to_patch | Prevent reading beyond end of file | Hi,
I think there's a bug in the AsyncFileStreamer helper.
Files larger than what can be written in first chunk cause a crash when downloading 2nd time with Chrome
proposed change fixes it for me
Erik | bd1c41a06b7e1dcdec5836c297629437ab218d2b | 19f5b28ed808510f278e81abc8d1432e71a735e3 | diff --git a/examples/helpers/AsyncFileStreamer.h b/examples/helpers/AsyncFileStreamer.h
index 3e76e5a3f..e29d49388 100644
--- a/examples/helpers/AsyncFileStreamer.h
+++ b/examples/helpers/AsyncFileStreamer.h
@@ -38,7 +38,8 @@ struct AsyncFileStreamer {
static void streamFile(uWS::HttpResponse<SSL> *res, AsyncFile... | [
"examples/helpers/AsyncFileStreamer.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,585 | issue_to_patch | Fix chunked body handling in fallback routine | Related to: https://github.com/uNetworking/uWebSockets.js/issues/879 | 8a1ed3cba8a4b8e5c2c2e6429494b29f960a351b | 0e17205e95ad0a0924e531ae5ac115f13d222f61 | diff --git a/src/HttpParser.h b/src/HttpParser.h
index 967d2356e..3455c45e6 100644
--- a/src/HttpParser.h
+++ b/src/HttpParser.h
@@ -580,21 +580,34 @@ struct HttpParser {
length -= consumed.first - had;
if (remainingStreamingBytes) {
- // this is exactly the same a... | [
"src/HttpParser.h"
] | [
{
"comment": "Now it is...",
"path": "src/HttpParser.h",
"hunk": "@@ -580,21 +580,34 @@ struct HttpParser {\n length -= consumed.first - had;\n \n if (remainingStreamingBytes) {\n- // this is exactly the same as above!\n- if (remainin... | true | ||
uNetworking/uWebSockets | 1,557 | issue_to_patch | Fix reported content length for HttpResponse::endWithoutBody | Hey!
I need to report a real size of a body in the HEAD response. It doesn't work without this patch.
Thanks. | 53ae0a889f5219f98b1f3d84212529373bbfdfad | a30b4bb75c73ab11df585933a8d681072dcc4bcc | diff --git a/src/HttpResponse.h b/src/HttpResponse.h
index 180725b2e..5185c8daf 100644
--- a/src/HttpResponse.h
+++ b/src/HttpResponse.h
@@ -420,7 +420,7 @@ struct HttpResponse : public AsyncSocket<SSL> {
/* End without a body (no content-length) or end with a spoofed content-length. */
void endWithoutBody(st... | [
"src/HttpResponse.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,579 | issue_to_patch | Add uws_loop_defer function to uWebsockets CAPI | Hello!
I am working on Rust bindings to uWebSockets, and as far as I understand, defer is the only way to use the library in multiple threads (which is necessary in my case).
So, this pull request adds a function `uws_loop_defer` to the CAPI.
Thank you for considering that PR. | c5abc1d75f1e72b8ddaff0c91b6fd3b43f2626b9 | 7446bfe0eba24b84e75a4070a808b2609e8b0162 | diff --git a/capi/libuwebsockets.cpp b/capi/libuwebsockets.cpp
index e2bb12fa0..c5bf1f6c9 100644
--- a/capi/libuwebsockets.cpp
+++ b/capi/libuwebsockets.cpp
@@ -23,6 +23,7 @@
#include "libuwebsockets.h"
#include <string_view>
#include "App.h"
+#include "ClientApp.h"
#include <optional>
extern "C"
{
@@ -1322,4 +13... | [
"capi/libuwebsockets.cpp",
"capi/libuwebsockets.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,571 | issue_to_patch | fix(CAPI) uws_res_upgrade, uws_res_override_write_offset, feat(CAPI) uws_res_close and subscription events | 1. add uws_res_close
2. fix uws_res_upgrade
3. fix uws_res_override_write_offset
4. add subscription events
Solves https://github.com/uNetworking/uWebSockets/issues/1566 and https://github.com/uNetworking/uWebSockets/issues/1542
| 9aff5ffa06b951f14a368c2eb465c788e31213f3 | 70b6aac780574c9ee1c1b8972a0c969e5efc86ad | diff --git a/capi/libuwebsockets.cpp b/capi/libuwebsockets.cpp
index e2bb12fa0..9cad9073f 100644
--- a/capi/libuwebsockets.cpp
+++ b/capi/libuwebsockets.cpp
@@ -1,16 +1,16 @@
/*
* Copyright 2022 Ciro Spaciari
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this softwa... | [
"capi/libuwebsockets.cpp"
] | [] | true | ||
uNetworking/uWebSockets | 1,575 | issue_to_patch | Fix [-Werror=format-truncation] compiler warning | This PR fixes the following compiler warning:
```cpp
../subprojects/uwebsockets/include/uwebsockets/LoopData.h:79:62: error: ‘ GMT’ directive output may be truncated writing 4 bytes into a region of size between 2 and 16 [-Werror=format-truncation=]
79 | snprintf(date, 32, "%.3s, %.2d %.3s %d %.2d:%.2d:... | 9aff5ffa06b951f14a368c2eb465c788e31213f3 | ee28e88eacae94f2db4c276235895c69d7cbc19d | diff --git a/src/LoopData.h b/src/LoopData.h
index bdc498c63..986bf0cbd 100644
--- a/src/LoopData.h
+++ b/src/LoopData.h
@@ -76,7 +76,7 @@ struct alignas(16) LoopData {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
- snprintf(date, 32, "%... | [
"src/LoopData.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,513 | issue_to_patch | [CAPI] add DLL_EXPORT for windows, void* user_data in websockets methods and size_t in methods/handler without it | included __declspec(dllexport) in capi headers for shared library on windows without .def files. | 8cf7e7386282095699f5f7a46be634ab8463baab | 2d7f6d882ea46ee24f5a3a285c11a75e01869b43 | diff --git a/capi/Makefile b/capi/Makefile
index fc935ad1d..583eceba0 100644
--- a/capi/Makefile
+++ b/capi/Makefile
@@ -8,20 +8,20 @@ default:
capi:
$(MAKE) clean
- cd ../uSockets && $(CC) -pthread -DLIBUS_USE_OPENSSL -DLIBUS_USE_LIBUV -std=c11 -Isrc -flto -fPIC -O3 -c src/*.c src/eventing/*.c src/crypto/*.c
+ cd... | [
"capi/Makefile",
"capi/libuwebsockets.cpp",
"capi/libuwebsockets.h",
"uSockets"
] | [] | true | ||
uNetworking/uWebSockets | 1,570 | issue_to_patch | CAPI typo: opcional_data -> optional_data
https://github.com/uNetworking/uWebSockets/blob/c5d687540ab6d12b5f33685892a08eb112df6ab1/capi/libuwebsockets.cpp#L1157
and some other places | Fix some typos | Fixes https://github.com/uNetworking/uWebSockets/issues/1567 and fixes a typo in a comment that I noticed. | c5d687540ab6d12b5f33685892a08eb112df6ab1 | 46a0a1c85c3997387d7cdcfed212f965d7d88ffd | diff --git a/capi/libuwebsockets.cpp b/capi/libuwebsockets.cpp
index bfe143f5c..e2bb12fa0 100644
--- a/capi/libuwebsockets.cpp
+++ b/capi/libuwebsockets.cpp
@@ -1154,51 +1154,51 @@ extern "C"
return uwsRes->hasResponded();
}
- void uws_res_on_writable(int ssl, uws_res_t *res, bool (*handler)(uws_res_... | [
"capi/libuwebsockets.cpp",
"capi/libuwebsockets.h",
"src/HttpResponse.h"
] | [] | true | |
uNetworking/uWebSockets | 1,561 | issue_to_patch | rename capi uws_req_set_field -> uws_req_set_yield | 53ae0a889f5219f98b1f3d84212529373bbfdfad | 5f64a31a49d15bf0d8964193f324c685bddc9f45 | diff --git a/capi/libuwebsockets.cpp b/capi/libuwebsockets.cpp
index f5cb2f8f0..bfe143f5c 100644
--- a/capi/libuwebsockets.cpp
+++ b/capi/libuwebsockets.cpp
@@ -1214,7 +1214,7 @@ extern "C"
return uwsReq->getYield();
}
- void uws_req_set_field(uws_req_t *res, bool yield)
+ void uws_req_set_yield(u... | [
"capi/libuwebsockets.cpp",
"capi/libuwebsockets.h"
] | [] | true | |||
uNetworking/uWebSockets | 1,531 | issue_to_patch | Add CodeQL workflow | Hi `uNetworking/uWebSockets`!
This is not an automatic, 🤖-generated PR, as you can check in my [GitHub profile](https://github.com/p-), I work for GitHub and I am part of the [GitHub Security Lab](https://securitylab.github.com/) which is helping out with the migration of LGTM configurations to Code Scanning.
You mig... | 526a9ad6cdc0299b95ef9c8d337ce99d2cac120a | 143aa50167e7d08b3a5b58a1cae89fe101d37a3a | diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 000000000..abafedce2
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,67 @@
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ 'master' ]
+ pull_request:
+ # The branches below must be a subset of the branch... | [
".github/workflows/codeql.yml"
] | [] | true | ||
uNetworking/uWebSockets | 1,523 | issue_to_patch | Add GitHub Action CIFuzz integration | Add [CIFuzz](https://google.github.io/oss-fuzz/getting-started/continuous-integration/) workflow action to have fuzzers build and run on each PR.
This is a service offered by OSS-Fuzz where uWebSockets already runs. CIFuzz can help detect catch regressions and fuzzing build issues early, and has a variety of feature... | 1d8634a609e955eed3c6788dbafde217fe799346 | f3406c8cd1597c015b6b146013e36572beaea7bb | diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml
new file mode 100644
index 000000000..cd0dcd088
--- /dev/null
+++ b/.github/workflows/cifuzz.yml
@@ -0,0 +1,26 @@
+name: CIFuzz
+on: [pull_request]
+jobs:
+ Fuzzing:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Build Fuzzers
+ id: bu... | [
".github/workflows/cifuzz.yml"
] | [] | true | ||
uNetworking/uWebSockets | 1,506 | issue_to_patch | added uws_req_get_case_sensitive_method in C API | added getCaseSensitiveMethod featured in v20.28.0 [Latest](https://github.com/uNetworking/uWebSockets/releases/latest) | 2a2c3ecb4527cad202fc0925d271fc3de0cc4247 | bbde4dd807dcff131abc8d7959bfdf5a7d5a80c3 | diff --git a/capi/libuwebsockets.cpp b/capi/libuwebsockets.cpp
index 19995623f..265f53133 100644
--- a/capi/libuwebsockets.cpp
+++ b/capi/libuwebsockets.cpp
@@ -1,3 +1,25 @@
+/*
+ * Copyright 2022 Ciro Spaciari
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software an... | [
"capi/libuwebsockets.cpp",
"capi/libuwebsockets.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,510 | issue_to_patch | Move TopicTreeMessage and TopicTreeBigMessage to TopicTree.h | `TopicTreeMessage` and `TopicTreeBigMessage` definitions are required prior to including App.h since I previously (#1507) changed it to do a forward declaration. The forward declaration created issues as other parts ended up accessing the structs, which require the definitions. | 624c217d3417d944baad21ddfd7d95461fbee8d9 | 86bf66be0e0554cdc7402069494f961c21a2be93 | diff --git a/src/App.h b/src/App.h
index 751fd1644..6a14529a0 100644
--- a/src/App.h
+++ b/src/App.h
@@ -23,18 +23,6 @@
#include <string_view>
namespace uWS {
- /* Type queued up when publishing */
- struct TopicTreeMessage {
- std::string message;
- /*OpCode*/ int opCode;
- bool compress... | [
"src/App.h",
"src/WebSocketContextData.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,509 | issue_to_patch | Use ULL (unsigned long long) instead of UL | The HelloWorld example failed on Windows (with MSVC) whereas it succeeded to run on macOS (XCode). So debugging both platforms in parallel revealed the parsing error due to using '0UL' instead of '0ULL'.
I checked both platforms with '0ULL' successfully now though I did not check Linux. | 9f0fe16842ee908f6fc7d5d5a80cd5bb336d7c67 | 3eef1d9ed8e0299e553fa7c0541a20d346c2880a | diff --git a/src/HttpParser.h b/src/HttpParser.h
index 263283db6..c9bbc3b0c 100644
--- a/src/HttpParser.h
+++ b/src/HttpParser.h
@@ -214,15 +214,15 @@ struct HttpParser {
}
static inline uint64_t hasLess(uint64_t x, uint64_t n) {
- return (((x)-~0UL/255*(n))&~(x)&~0UL/255*128);
+ return ((... | [
"src/HttpParser.h"
] | [] | true | ||
uNetworking/uWebSockets | 1,507 | issue_to_patch | Declare TopicTreeMessage and TopicTreeBigMessage prior to use | `TopicTreeMessage` and `TopicTreeBigMessage` are defined in App.h. This means that if App.h doesn't come first somehow, then there will be an error as those definitions can't be found. So declare it here, just like it was done with `WebSocket` and let the actual definition come later.
I was able to get this behavior... | bba6c9b0cda2e906a82cdf5407a215d779138a14 | 634cf3ef9df0bdf609d0cebf99534b4a447dc8ac | diff --git a/src/WebSocketContextData.h b/src/WebSocketContextData.h
index ccd1530e2..9301f3d7c 100644
--- a/src/WebSocketContextData.h
+++ b/src/WebSocketContextData.h
@@ -32,6 +32,8 @@
namespace uWS {
template <bool, bool, typename> struct WebSocket;
+struct TopicTreeMessage;
+struct TopicTreeBigMessage;
/* to... | [
"src/WebSocketContextData.h"
] | [] | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.