Publish percent-encoding-iri and optional IRI percent-encoding#1
Publish percent-encoding-iri and optional IRI percent-encoding#1fernandolins wants to merge 10 commits intomainfrom
Conversation
Transitive ICU deps pull in zerovec 0.11.6, which requires rustc 1.83+.
| if: ${{ !inputs.dry_run }} | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| environment: crates-io |
There was a problem hiding this comment.
Need to confirm with @andrewsanchez if the release environment should be used instead.
There was a problem hiding this comment.
Yeah, probably it is!
However, it should be released separately from Anki. Because this library needs to exist, be updated in Anki, and then Anki needs to be published.
|
|
||
| - name: Publish to crates.io | ||
| env: | ||
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
There was a problem hiding this comment.
Can't we use Trusted Publishing instead? https://crates.io/docs/trusted-publishing
There was a problem hiding this comment.
Yes, we can do it, but we have to set it up on crates.io
There was a problem hiding this comment.
Sorry if I'm forgetting discussion about this, but do we really need to publish to crates.io? Why not something like this?
some-crate = { git = "https://github.com/your-username/forked-crate", rev = "a1b2c3d4" }
- name: Cache Cargo registry + git deps
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git # <-- this caches your git dependencies
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}There was a problem hiding this comment.
Since our main goal is to publish Anki, then yes, we will need to publish this fork that is used as a dependency in Anki project.
Summary
irifeature to the percent-encoding stack: when enabled,AsciiSet::should_percent_encodeonly encodes ASCII bytes in the set; non-ASCII UTF-8 octets are left literal (IRI-style). Default behaviour stays WHATWG-style for the rest of the workspace.percent-encoding-iri, with[lib] name = "percent_encoding"sourl/form_urlencodedkeepuse percent_encoding::…viapackage = "percent-encoding-iri".cargo test -p percent-encoding-iri --features irionmainCI; 1.63 lockfile is updated for the new package name.cargo publish --dry-runby default, and optional real publish to crates.io (restricted tomain, optionalcrates-ioenvironment for approvals).Motivation
Matches the use case described for consumers that need Unicode path segments to stay readable in contexts such as
file:/ local media (see servo/rust-url#871 for background) while keeping default behaviour for existingurl+ WHATWG test expectations.Publishing
percent-encoding-irirelease: version inpercent_encoding/Cargo.toml(e.g. 2.3.2).CARGO_REGISTRY_TOKENand optionally Environmentcrates-iowith required reviewers; run Publish percent-encoding-iri withdry_runto validate only, or withdry_runoff to upload.