#Dark mode

40 messages · Page 1 of 1 (latest)

empty hazel

It looks like to OP did some weird merges from main that put that branch in a really weird state. I'd suggest pulling them down and cherry picking just the commits onto a another branch entirely.

unique crystal

I mean, the diff looks okay to me

empty hazel
unique crystal

seems to still fail

empty hazel

hrm - it shouldn't have any conflicts as it's entirely linear on top of master:

* c604a29 (HEAD -> jm/dark-mode, origin/jm/dark-mode) run prettier
* a48c551 fix: :bug: empty white space on large resolutions in dark theme
* dd1fec6 footer color contrast issue
* 33e75a3 fix: color contrast fixes
* e4b5527 fix: toggle button and navbar style fixes
* 9bd8bf0 feat: added toggle theme button
* 999d2e4 minor fix
* 23bb61e added dark mode styles
* 44afd93 (upstream/master, upstream/HEAD, origin/master, master) corrected overflow-x style to remove unnecessary horizontal scroll bar (#770)
* 2f7195d Update link of trait BufMut in framing.md (#769)
unique crystal

If you're able to get CI to pass, that would be a big help.

empty hazel

I ran prettier to fix the formatting just now, but that didn't help. Will dig into it in a bit.

unique crystal

Thanks!

empty hazel

The failures are now unrelated to the changes I think (failures in the markdown example code tests). Will submit another PR for that.

unique crystal

That would be great!

empty hazel

The doc tests running against the markdown seem to not pick up the async fn main properly. Not entirely sure why that is

empty hazel

It's a rust version issue - works with 1.81, not with 1.82

running 1 test
test target/debug/build/doc-test-e59cfd1eb6cb6f8b/out/doctests.rs - tokio::tutorial::hello_tokio_md (line 27) ... FAILED

failures:

---- target/debug/build/doc-test-e59cfd1eb6cb6f8b/out/doctests.rs - tokio::tutorial::hello_tokio_md (line 27) stdout ----
error[E0601]: `main` function not found in crate `rust_out`
 --> target/debug/build/doc-test-e59cfd1eb6cb6f8b/out/doctests.rs:34:2
  |
8 | }
  |  ^ the main function must be defined at the crate level (in `target/debug/build/doc-test-e59cfd1eb6cb6f8b/out/doctests.rs`)
  |
note: here is a function named `main`
 --> target/debug/build/doc-test-e59cfd1eb6cb6f8b/out/doctests.rs:32:7
  |
6 | async fn main() {
  |       ^^^^^^^^^
  = note: you have one or more functions named `main` not defined at the crate level
  = help: consider moving the `main` function definitions

error: aborting due to 1 previous error

Something's changed in the way 1.82 runs tests where if you have a main function defined inside another function, it detects that as the main function for the test, rather than ignoring it. This used to work fine to hide the function, but no longer does:

# fn dox() {
#[tokio::main]
async fn main() {
}
# }
unique crystal

Well, let's start by submitting a PR to pin CI to rustc 1.81 ...

empty hazel
unique crystal
empty hazel

I'm digging into it

So far just getting an understanding of where it likely is - I couldn't find anything obviously related in the release notes.

empty hazel
empty hazel

The deploy errors look like they're from outdated packages - any objections to getting dependabot handling that for you automatically?

unique crystal

Isn't it going to create PRs all the time ...

empty hazel

This is the config we use for ratatui.rs:

# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
    groups:
      npm-dependencies:
        patterns: ["*"]
  - package-ecosystem: "cargo"
    directory: "/"
    schedule:
      interval: "weekly"
    groups:
      cargo-dependencies:
        patterns: ["*"]

Bugs us weekly, and groups the updates into npm and cargo (rarely github actions)

unique crystal

Ok. Can you make it monthly?

empty hazel

yep

I'd also point it at the correct dirs for cargo, but these may not match docs that use specific versions.
That said, I'd be inclined to make the docs use cargo add instead of editing cargo.toml

unique crystal

What do you mean by editing Cargo.toml?

empty hazel

In (at least one) doc I noticed that the approach to setting up tokio / mini-redis was "edit Cargo.toml with these values..."

hello_tokio.md IIRC

unique crystal

🤷‍♀️ I don't mind changing it

empty hazel

ok - on it

empty hazel

The dependabot PRs highlighted a few new errors - IMO, that's a good thing, because it means that users would have probably seen and had to deal with them at some point when updating their code to later versions. I'll check into them later today.

unique crystal
empty hazel

Turning it on when you haven't updated in a while can be a bit overwhelming. In normal situations though the PRs should be grouped such that you get max of 3 per period (possibly more if there's security deps)

unique crystal