--- date: 2024-04-23 url: https://hackmd.io/Qz4_QPVXRMuOipOPkqOySA --- # Libs-API Meeting 2024-04-23 ###### tags: `Libs Meetings` `Minutes` **Meeting Link**: https://meet.jit.si/rust-libs-meeting-crxoz2at8hiccp7b3ixf89qgxfymlbwr **Attendees**: Amanieu, David, TC, Eric Holk, The 8472, Josh, Chris Denton **Minutes**: TC ## Agenda - Triage - Anything else? ## Triage ### FCPs 1 rust-lang/rfcs T-libs-api FCPs - merge rust.tf/rfc3550 *RFC: New range types for Edition 2024* - (3 checkboxes left) 21 rust-lang/rust T-libs-api FCPs - merge rust.tf/80437 *Tracking Issue for \`box\_into\_inner\`* - (1 checkboxes left) - merge rust.tf/82901 *Tracking Issue for \`Option::get\_or\_insert\_default\`* - (2 checkboxes left) - merge rust.tf/83871 *Tracking Issue for CharIndices::offset function* - (3 checkboxes left) - merge rust.tf/98934 *Add \`Option::take\_if\`* - (3 checkboxes left) - merge rust.tf/102012 *Tracking Issue for \`const\_waker\`* - (3 checkboxes left) - merge rust.tf/106943 *Implement DoubleEnded and ExactSize for Take\<Repeat\> and Take\<RepeatWith\>* - (3 checkboxes left) - merge rust.tf/113744 *Tracking Issue for \`IpvNAddr::{BITS, to\_bits, from\_bits}\` (\`ip\_bits\`)* - (3 checkboxes left) - merge rust.tf/62726 *Tracking issue for io\_slice\_advance* - (3 checkboxes left) - merge rust.tf/109402 *Implement owned ops for \`HashSet\` and \`BTreeSet\`* - (3 checkboxes left) - merge rust.tf/116113 * Generalize \`{Rc,Arc}::make\_mut()\` to unsized types.* - (4 checkboxes left) - merge rust.tf/115974 *Split core's PanicInfo and std's PanicInfo* - (2 checkboxes left) - merge rust.tf/117468 *Stabilize Wasm relaxed SIMD* - (4 checkboxes left) - merge rust.tf/101196 *Tracking Issue for \`Ready::into\_inner()\`* - (1 checkboxes left) - merge rust.tf/119131 *Tracking Issue for \`hint::assert\_unchecked\`* - (2 checkboxes left) - merge rust.tf/106418 *Implement \`PartialOrd\` and \`Ord\` for \`Discriminant\`* - (2 checkboxes left) - close rust.tf/56167 *Tracking issue for HashMap::raw\_entry* - (3 checkboxes left) - merge rust.tf/113219 *Tracking Issue for \`const\_cstr\_from\_ptr\`* - (5 checkboxes left) - merge rust.tf/123168 *Add \`size\_of\` and \`size\_of\_val\` and \`align\_of\` and \`align\_of\_val\` to the prelude* - (1 checkboxes left) - merge rust.tf/55132 *Tracking issue for thread::Builder::spawn\_unchecked* - (4 checkboxes left) - merge rust.tf/98485 *Tracking Issue for \`AtomicBool::fetch\_not\`* - (4 checkboxes left) - merge rust.tf/124097 *Add \`IntoIterator\` for \`Box\<\[T\]\>\` + edition 2024\-specific lints* - (4 checkboxes left) [BurntSushi (12)](https://rfcbot.rs/fcp/BurntSushi), [scottmcm (1)](https://rfcbot.rs/fcp/scottmcm), [nikomatsakis (5)](https://rfcbot.rs/fcp/nikomatsakis), [tmandry (2)](https://rfcbot.rs/fcp/tmandry), [yaahc (2)](https://rfcbot.rs/fcp/yaahc), [pnkfelix (3)](https://rfcbot.rs/fcp/pnkfelix), [joshtriplett (16)](https://rfcbot.rs/fcp/joshtriplett), [m-ou-se (14)](https://rfcbot.rs/fcp/m-ou-se), [dtolnay (1)](https://rfcbot.rs/fcp/dtolnay), [Amanieu (7)](https://rfcbot.rs/fcp/Amanieu) ### (nominated) rust.tf/119128 *Tracking Issue for split\_at\_checked* Amanieu: Any objections to stabilizing, any objections on the name? David: This looks good to me. Amanieu: First comment: return Option or Result? David: My inclination is to keep the `Option` return type. There is str::is_char_boundary if someone needs to recognize that case Amanieu: Result can be more informative if one is immediately unwrapping. Option aligns with the return type of str::get consensus: agreed on Option Amanieu: Method name? The8472: `_checked` matches `_unchecked` which is already stable. eholk: What the function returns, `Option` or `Result` may have some bearing on the name. eholk: I agree returning `Option` is the right thing to do. Amanieu: I'll start an FCP. ### (nominated) rust.tf/121377 *Partially stabilize \`LazyCell\` and \`LazyLock\`* Amanieu: We discussed this last week and came to a conclusion to go for a full stabilization. I'll unnominate this and write a summary comment. ### (nominated) rust.tf/123110 *Rename iter::Iterator::intersperse() to ::separate()* Amanieu: We discussed this last week. Update from https://github.com/rust-lang/rust/issues/89151 Amanieu: This is blocked on lang and nominated for them. If lang says "no" on this RFC, we may need to reconsider. ### (nominated) rust.tf/123728 *Windows: Consider disallowing \`.bat\` and \`.cmd\` files in \`Command::new\`* Amanieu: There seemed to be consensus on keeping this but not on documenting the support. Any thoughts on documenting it? The8472: We are not supporting executing any other file types. So it would not be a good precedent. People might try to expand on this. One thing to consider is whether libraries can do any better. If we make this part of `Command`, then people will keep using this, but if it's only a crutch, then people should probably use something else. David: If we do document this and say why it's problematic, I feel this gives a better outcome for the concerns discussed. Amanieu: +1. Josh: I think we should document this also. We can spell out explicitly that this is deprecated and can enumerate the issues. If we have the functionality, we should document it. Amanieu: The documentation could help people coming from Unix. The8472: If we document it, people might be more likely to reach for it. Josh: On Windows, PowerShell is a more reasonable tool for scripting. But batch files can be easier for simply running three commands by sticking three lines in a .bat file. Batch files exist, people are going to keep using them, and it's not going anywhere. We should document the level of support we're already providing. Amanieu: My argument is that people use this in practice and we're committed to supporting it to the level that we currently do. The8472: I'm suggesting that we could maybe remove this one day since we never officially promised this in the first place. The8472: I'm worried if we say that it's deprecated and we don't have anything to recommend, that people will just ignore this warning. Amanieu: We would suggest that people call the script interpreter directly. Josh: Suggestion for documentation: > "For backwards compatibility, this API supports executing `.bat` and `.cmd` files on Windows. However, that support has problems, the method used to quote arguments is error-prone, and this support should not be used together with untrusted command-line arguments." Amanieu: The consensus is to document this as deprecated. Amanieu: We have existing documentation here: https://doc.rust-lang.org/nightly/src/std/process.rs.html#115 Josh: This documentation already looks reasonable. We should keep that verbatim. Amanieu: In that case, we can just close the issue. ### rust.tf/99543 *Tracking Issue for utf8_chunks* David: I want to confirm all of us are OK moving forward here. We can add the missing piece in the future if someone appropriately justifies it. (No objections raised.) ### (nominated) rust.tf/124097 *Add \`IntoIterator\` for \`Box\<\[T\]\>\` + edition 2024\-specific lints* Amanieu: We discussed this last week and were OK with this. previous discussion: https://hackmd.io/yAMv6TOdTk6YZXZDJGonyg > Consensus: same type Amanieu: We agreed to use the same type as for `Vec`. It would be a breaking change to change this later on. If we want to play it safe we could make this a wrapper type around `Vec::IntoIter`. Amanieu: The cost of reusing the type is 8 wasted bytes. David: There's another arrangement that makes sense where we reuse the type used for the array type. Amanieu: (Gives some analysis.) We'll go with what's proposed in these PRs here. We speculate that the savings in compile time from using the same type outweigh the wasted bytes in some cases. ### (nominated) rust.tf/124108 *Add \`Box\<\[T; N\]\>: IntoIterator\` without any method dispatch hacks* Breakage is acceptable, Amanieu to reply. David: Normally making `Box<..>` implement something new is a breaking change. This connects to it being `fundamental`. But only the standard library can implement `Box<SomeStdLibType>`, sot that negates that effect. I'll think about this some more and maybe raise this as a T-types issue. ### (nominated) rust.tf/rfc3550 *RFC: New range types for Edition 2024* Amanieu: I'll unnominate. ### (waiting on team) rust.tf/119550 *Rename \`AsyncIterator\` back to \`Stream\`, introduce an AFIT\-based \`AsyncIterator\` trait* This isn't waiting on us. ### (waiting on team) rust.tf/122661 *Assert that the first \`assert!\` expression is \`bool\`* This isn't waiting on us either. ### (new change proposal) rust.tf/libs367 *Enable accessing written data in a \`BorrowedCursor\`* Josh: It does seem like you can get a reference to the initialized portion of the data via this API. There seems to be a contradiction here. Amanieu: Is there any downside to allowing access to written data? The8472: Written since the creation of the buffer, or written since the last write, etc.? Amanieu: I think what's in the ACP is a reasonable ask. Josh: In theory, it's possible with the current API to ask for a cursor that has only the initialized data and get something with the rest of the data and to process those in parallel. Accepting this ACP would preclude that. Amanieu: My impression is that what's in the ACP would be a useful feature to have but might require more API rework. Amanieu: I'll reply to that effect on the issue. Josh: Actually, I'm wondering if, given what the person is trying to do here, there might be a better way to express it. Amanieu: Looking more closely at what is being proposed, I actually think that's a great idea. I'm happy to accept that. Amanieu: The `_with_` approach is interesting. Josh: That works particularly well here. I'll write the comment. (The meeting ended here.) --- ### (new change proposal) rust.tf/libs368 *impl PathBuf::add\_extension and Path::with\_extra\_extension* ### (new change proposal) rust.tf/libs369 *Implement more \`ExactSizeIterators\` on 64\-bit platforms* ### (new change proposal) rust.tf/libs370 *ACP: macro for UTF\-16 literals* ### (new change proposal) rust.tf/libs371 *ACP: primitive numeric traits* ### (stalled change proposal) rust.tf/libs205 *Expose the internal \`SimpleMessage\` struct and allow creating \`std::io::Error\`s with them* ### (stalled change proposal) rust.tf/libs195 *OS\-level \`thread::Builder\` priority and affinity extensions* ### (stalled change proposal) rust.tf/libs255 *Adding \`set\_route\` to \`sys::unix::net\`* ### (stalled change proposal) rust.tf/libs202 *Support for non\-blocking and best\-effort zero\-copy \`io::copy\`* ### (stalled change proposal) rust.tf/libs114 *ACP: Method to split OsStr into \`(str, OsStr)\`* _Generated by [fully-automatic-rust-libs-team-triage-meeting-agenda-generator](https://github.com/rust-lang/libs-team/tree/main/tools/agenda-generator)_