diff --git a/mdbook-goals/src/gh.rs b/mdbook-goals/src/gh.rs new file mode 100644 index 0000000..990a6f3 --- /dev/null +++ b/mdbook-goals/src/gh.rs @@ -0,0 +1,50 @@ +use std::fmt::Display; + +use crate::re::TRACKING_ISSUE; + +#[derive(PartialEq, Eq, PartialOrd, Ord, Clone)] +pub struct IssueId { + /// Something like `rust-lang/rust-project-goals` + pub repository: String, + + /// Something like `22` + pub number: u64, +} + +impl IssueId { + pub fn new(repository: &(impl Display + ?Sized), number: u64) -> Self { + Self { + repository: repository.to_string(), + number, + } + } +} + +impl std::fmt::Debug for IssueId { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{self}") + } +} + +impl std::fmt::Display for IssueId { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "[{repository}#{number}]", + repository = self.repository, + number = self.number, + ) + } +} + +impl std::str::FromStr for IssueId { + type Err = anyhow::Error; + + fn from_str(s: &str) -> Result { + let Some(c) = TRACKING_ISSUE.captures(s) else { + anyhow::bail!("invalid issue-id") + }; + + Ok(IssueId::new(&c[1], c[2].parse()?)) + } +} diff --git a/mdbook-goals/src/goal.rs b/mdbook-goals/src/goal.rs index 65250ec..86fa2e9 100644 --- a/mdbook-goals/src/goal.rs +++ b/mdbook-goals/src/goal.rs @@ -6,6 +6,7 @@ use std::{collections::BTreeSet, path::PathBuf}; use anyhow::Context; use regex::Regex; +use crate::gh::IssueId; use crate::re::USERNAME; use crate::team::{self, TeamName}; use crate::util::{commas, markdown_files}; @@ -15,6 +16,7 @@ use crate::{ }; /// Data parsed from a goal file in the expected format +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)] pub struct GoalDocument { /// Path relative to the current directory (`book.toml`) pub path: PathBuf, @@ -37,17 +39,21 @@ pub struct GoalDocument { } /// Metadata loaded from the goal header -#[derive(Debug)] +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)] pub struct Metadata { #[allow(unused)] pub title: String, pub short_title: String, pub owners: String, pub status: Status, + pub tracking_issue: Option, + pub table: Table, } +pub const TRACKING_ISSUE_ROW: &str = "Tracking issue"; + /// Identifies a particular ask for a set of Rust teams -#[derive(Debug)] +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)] pub struct PlanItem { pub text: String, pub owners: String, @@ -66,7 +72,7 @@ pub enum ParsedOwners { } /// Identifies a particular ask for a set of Rust teams -#[derive(Debug)] +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)] pub struct TeamAsk { /// Path to the markdown file containing this ask (appropriate for a link) pub link_path: Arc, @@ -153,6 +159,16 @@ impl GoalDocument { Status::NotAccepted => false, } } + + /// Modify the goal document on disk to link to the given issue number in the metadata. + pub(crate) fn link_issue(&self, number: IssueId) -> anyhow::Result<()> { + let mut metadata_table = self.metadata.table.clone(); + metadata_table.add_key_value_row(TRACKING_ISSUE_ROW, &number); + self.metadata + .table + .overwrite_in_path(&self.path, &metadata_table)?; + Ok(()) + } } /// Format a set of team asks into a table, with asks separated by team and grouped by kind. @@ -240,7 +256,7 @@ pub fn format_goal_table(goals: &[&GoalDocument]) -> anyhow::Result { Ok(util::format_table(&table)) } -#[derive(Copy, Clone, Debug, PartialEq, Eq)] +#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Copy, Clone)] pub enum Status { Flagship, Accepted, @@ -308,6 +324,15 @@ fn extract_metadata(sections: &[Section]) -> anyhow::Result> { let status = Status::try_from(status_row[1].as_str())?; + let issue = match first_table + .rows + .iter() + .find(|row| row[0] == TRACKING_ISSUE_ROW) + { + Some(r) => Some(r[1].parse()?), + None => None, + }; + Ok(Some(Metadata { title: title.to_string(), short_title: if let Some(row) = short_title_row { @@ -317,6 +342,8 @@ fn extract_metadata(sections: &[Section]) -> anyhow::Result> { }, owners: owners_row[1].to_string(), status, + tracking_issue: issue, + table: first_table.clone(), })) } diff --git a/mdbook-goals/src/json.rs b/mdbook-goals/src/json.rs new file mode 100644 index 0000000..fc6475d --- /dev/null +++ b/mdbook-goals/src/json.rs @@ -0,0 +1,4 @@ +pub(super) fn generate_json() { + +} + diff --git a/mdbook-goals/src/main.rs b/mdbook-goals/src/main.rs index 7918815..43b8942 100644 --- a/mdbook-goals/src/main.rs +++ b/mdbook-goals/src/main.rs @@ -7,6 +7,7 @@ use std::{io, path::PathBuf}; use structopt::StructOpt; use walkdir::WalkDir; +mod gh; mod goal; mod markwaydown; mod mdbook_preprocessor; diff --git a/mdbook-goals/src/markwaydown.rs b/mdbook-goals/src/markwaydown.rs index 5f39efa..43d9021 100644 --- a/mdbook-goals/src/markwaydown.rs +++ b/mdbook-goals/src/markwaydown.rs @@ -1,6 +1,8 @@ //! Arguably the worst markdown parser ever. Extracts exactly the things we care about. -use std::path::Path; +use std::{fmt::Display, path::Path}; + +use crate::util; #[derive(Debug)] pub struct Section { @@ -10,7 +12,7 @@ pub struct Section { pub tables: Vec, } -#[derive(Debug)] +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] pub struct Table { pub line_num: usize, pub header: Vec, @@ -150,3 +152,56 @@ fn categorize_line(line: &str) -> CategorizeLine { CategorizeLine::Other } } + +impl Table { + /// For a "key-value" table (like metadata), find an existing row + /// where the first column (the "key") is `row_key` and modify its second column (the "value") + /// to be `row_value`. If no row exists with key `row_key`, then add a new row. + pub fn add_key_value_row(&mut self, row_key: &str, row_value: &impl Display) { + assert_eq!(self.header.len(), 2); + + match self.rows.iter_mut().find(|row| row[0] == row_key) { + Some(row) => { + row[1] = row_value.to_string(); + } + + None => { + self.rows + .push(vec![row_key.to_string(), row_value.to_string()]); + } + } + } + + /// Modify `path` to replace the lines containing this table with `new_table`. + pub fn overwrite_in_path(&self, path: &Path, new_table: &Table) -> anyhow::Result<()> { + let full_text = std::fs::read_to_string(path)?; + + let mut new_lines = vec![]; + new_lines.extend( + full_text + .lines() + .take(self.line_num - 1) + .map(|s| s.to_string()), + ); + + let table_text = { + let mut new_rows = vec![new_table.header.clone()]; + new_rows.extend(new_table.rows.iter().cloned()); + util::format_table(&new_rows) + }; + new_lines.push(table_text); + + new_lines.extend( + full_text + .lines() + .skip(self.line_num - 1) + .skip(2 + self.rows.len()) + .map(|s| s.to_string()), + ); + + let new_text = new_lines.join("\n"); + std::fs::write(path, new_text)?; + + Ok(()) + } +} diff --git a/mdbook-goals/src/re.rs b/mdbook-goals/src/re.rs index faa02f0..f2dc3d0 100644 --- a/mdbook-goals/src/re.rs +++ b/mdbook-goals/src/re.rs @@ -16,3 +16,7 @@ lazy_static! { lazy_static! { pub static ref USERNAME: Regex = Regex::new(r"@([-a-zA-Z0-9])+").unwrap(); } + +lazy_static! { + pub static ref TRACKING_ISSUE: Regex = Regex::new(r"\[([^#]*)#([0-9]+)\]").unwrap(); +} diff --git a/mdbook-goals/src/rfc.rs b/mdbook-goals/src/rfc.rs index 3085c7e..e08139f 100644 --- a/mdbook-goals/src/rfc.rs +++ b/mdbook-goals/src/rfc.rs @@ -11,6 +11,7 @@ use regex::Regex; use serde::{Deserialize, Serialize}; use crate::{ + gh::IssueId, goal::{self, GoalDocument, ParsedOwners, PlanItem, Status}, team::{get_person_data, TeamName}, }; @@ -154,20 +155,23 @@ pub fn generate_issues( } #[derive(Debug, PartialEq, Eq, PartialOrd, Ord)] -pub struct GithubIssue { +pub struct GithubIssue<'doc> { pub title: String, pub assignees: BTreeSet, pub body: String, pub labels: Vec, + pub tracking_issue: Option<&'doc IssueId>, + pub goal_document: &'doc GoalDocument, } #[derive(Debug, PartialEq, Eq, PartialOrd, Ord)] -enum GithubAction { +enum GithubAction<'doc> { CreateLabel { label: GhLabel, }, + CreateIssue { - issue: GithubIssue, + issue: GithubIssue<'doc>, }, // We intentionally do not sync the issue *text*, because it may have been edited. @@ -180,6 +184,11 @@ enum GithubAction { LockIssue { number: u64, }, + + LinkToTrackingIssue { + goal_document: &'doc GoalDocument, + issue_id: IssueId, + }, } #[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)] @@ -254,6 +263,8 @@ fn list_issue_titles_in_milestone( .arg("list") .arg("-m") .arg(timeframe) + .arg("-s") + .arg("all") .arg("--json") .arg("title,assignees,number,comments") .output()?; @@ -286,7 +297,7 @@ fn list_issue_titles_in_milestone( fn initialize_labels( repository: &str, teams_with_asks: &BTreeSet<&TeamName>, -) -> anyhow::Result> { +) -> anyhow::Result>> { const TEAM_LABEL_COLOR: &str = "bfd4f2"; let mut desired_labels: BTreeSet<_> = teams_with_asks @@ -323,11 +334,11 @@ fn initialize_labels( /// Initializes the required `T-` labels on the repository. /// Warns if the labels are found with wrong color. -fn initialize_issues( +fn initialize_issues<'doc>( repository: &str, timeframe: &str, - goal_documents: &[GoalDocument], -) -> anyhow::Result> { + goal_documents: &'doc [GoalDocument], +) -> anyhow::Result>> { // the set of issues we want to exist let desired_issues: BTreeSet = goal_documents .iter() @@ -361,6 +372,14 @@ fn initialize_issues( number: existing_issue.number, }); } + + let issue_id = IssueId::new(repository, existing_issue.number); + if desired_issue.tracking_issue != Some(&issue_id) { + actions.insert(GithubAction::LinkToTrackingIssue { + goal_document: desired_issue.goal_document, + issue_id, + }); + } } None => { @@ -382,7 +401,7 @@ impl ExistingGithubIssue { } } -fn issue(timeframe: &str, document: &GoalDocument) -> anyhow::Result { +fn issue<'doc>(timeframe: &str, document: &'doc GoalDocument) -> anyhow::Result> { let mut assignees = BTreeSet::default(); for username in document.metadata.owner_usernames() { if let Some(data) = get_person_data(username)? { @@ -403,6 +422,8 @@ fn issue(timeframe: &str, document: &GoalDocument) -> anyhow::Result BTreeSet<&'static TeamNam .collect() } -impl Display for GithubAction { +impl Display for GithubAction<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { GithubAction::CreateLabel { @@ -519,11 +540,21 @@ impl Display for GithubAction { GithubAction::LockIssue { number } => { write!(f, "lock issue #{}", number) } + GithubAction::LinkToTrackingIssue { + goal_document, + issue_id, + } => { + write!( + f, + "link issue {issue_id:?} to the markdown document at {}", + goal_document.path.display() + ) + } } } } -impl GithubAction { +impl GithubAction<'_> { pub fn execute(self, repository: &str, timeframe: &str) -> anyhow::Result<()> { match self { GithubAction::CreateLabel { @@ -558,6 +589,8 @@ impl GithubAction { assignees, body, labels, + tracking_issue: _, + goal_document: _, }, } => { let output = Command::new("gh") @@ -621,7 +654,13 @@ impl GithubAction { Ok(()) } } + GithubAction::LockIssue { number } => lock_issue(repository, number), + + GithubAction::LinkToTrackingIssue { + goal_document, + issue_id: number, + } => goal_document.link_issue(number), } } } diff --git a/src/2024h2/ATPIT.md b/src/2024h2/ATPIT.md index 4f9dbdf..a18e19e 100644 --- a/src/2024h2/ATPIT.md +++ b/src/2024h2/ATPIT.md @@ -1,10 +1,12 @@ # Associated type position impl trait -| Metadata | | -| -------- | --------------- | -| Owner(s) | @oli-obk | -| Teams | [types], [lang] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @oli-obk | +| Teams | [types], [lang] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#103] | + ## Summary diff --git a/src/2024h2/Patterns-of-empty-types.md b/src/2024h2/Patterns-of-empty-types.md index 8f6e1bf..9156309 100644 --- a/src/2024h2/Patterns-of-empty-types.md +++ b/src/2024h2/Patterns-of-empty-types.md @@ -1,10 +1,12 @@ # Patterns of empty types -| Metadata | | -| -------- | ---------- | -| Owner(s) | @Nadrieril | -| Teams | [lang] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @Nadrieril | +| Teams | [lang] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#115] | + ## Summary @@ -109,4 +111,4 @@ Note: [`exhaustive_patterns`]: https://github.com/rust-lang/rust/issues/51085 [`min_exhaustive_patterns`]: https://github.com/rust-lang/rust/issues/119612 -[`never_patterns`]: https://github.com/rust-lang/rust/issues/118155 +[`never_patterns`]: https://github.com/rust-lang/rust/issues/118155 \ No newline at end of file diff --git a/src/2024h2/Polonius.md b/src/2024h2/Polonius.md index 6cdfc1f..583d135 100644 --- a/src/2024h2/Polonius.md +++ b/src/2024h2/Polonius.md @@ -1,10 +1,12 @@ # Scalable Polonius support on nightly -| Metadata | | -| -------- | -------- | -| Owner(s) | @lqd | -| Teams | [types] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @lqd | +| Teams | [types] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#118] | + ## Summary diff --git a/src/2024h2/Project-goal-slate.md b/src/2024h2/Project-goal-slate.md index c3cc426..8581186 100644 --- a/src/2024h2/Project-goal-slate.md +++ b/src/2024h2/Project-goal-slate.md @@ -1,10 +1,12 @@ # Assemble project goal slate -| Metadata | | -| -------- | -------------------- | -| Owner(s) | @nikomatsakis | -| Teams | [leadership-council] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @nikomatsakis | +| Teams | [leadership-council] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#102] | + *Extracted from [RFC 3614](https://github.com/rust-lang/rfcs/blob/master/text/3614-project-goals.md)* @@ -178,4 +180,4 @@ Simply put, no. The owner will review the goals and ensure a quality slate, but ### Why the six months horizon? -Per the previous points, it is helpful to have a "season" for goals, but having e.g. an annual process prevents us from reacting to new ideas in a nimble fashion. At the same time, doing quarterly planning, as some companies do, is quite regular overhead. Six months seemed like a nice compromise, and it leaves room for a hefty discussion period of about 2 months, which sems like a good fit for an open-source project. +Per the previous points, it is helpful to have a "season" for goals, but having e.g. an annual process prevents us from reacting to new ideas in a nimble fashion. At the same time, doing quarterly planning, as some companies do, is quite regular overhead. Six months seemed like a nice compromise, and it leaves room for a hefty discussion period of about 2 months, which sems like a good fit for an open-source project. \ No newline at end of file diff --git a/src/2024h2/Rust-2024-Edition.md b/src/2024h2/Rust-2024-Edition.md index 5832df0..f1b2c46 100644 --- a/src/2024h2/Rust-2024-Edition.md +++ b/src/2024h2/Rust-2024-Edition.md @@ -1,10 +1,12 @@ # Rust 2024 Edition -| Metadata | | -| -------- | --------------- | -| Owner(s) | @traviscross | -| Teams | [lang], [types] | -| Status | Flagship | +| Metadata | | +| --- | --- | +| Owner(s) | @traviscross | +| Teams | [lang], [types] | +| Status | Flagship | +| Tracking issue | [rust-lang/rust-project-goals#117] | + ## Summary diff --git a/src/2024h2/Rust-for-SciComp.md b/src/2024h2/Rust-for-SciComp.md index 67af993..5c6dd00 100644 --- a/src/2024h2/Rust-for-SciComp.md +++ b/src/2024h2/Rust-for-SciComp.md @@ -1,10 +1,12 @@ # Expose experimental LLVM features for automatic differentiation and GPU offloading -| Metadata | | -| -------- | ------------------ | -| Owner(s) | @ZuseZ4 | -| Teams | [lang], [compiler] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @ZuseZ4 | +| Teams | [lang], [compiler] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#109] | + ## Summary @@ -146,4 +148,4 @@ TODO ### How about Safety? -We want all these features to be safe by default, and are happy to not expose some features if the gain is too small for the safety risk. As an example, Enzyme can compute the derivative with respect to a global. That's probably too niche, and could be discouraged (and unsafe) for Rust. +We want all these features to be safe by default, and are happy to not expose some features if the gain is too small for the safety risk. As an example, Enzyme can compute the derivative with respect to a global. That's probably too niche, and could be discouraged (and unsafe) for Rust. \ No newline at end of file diff --git a/src/2024h2/a-mir-formality.md b/src/2024h2/a-mir-formality.md index 9fee244..53fd4c8 100644 --- a/src/2024h2/a-mir-formality.md +++ b/src/2024h2/a-mir-formality.md @@ -1,10 +1,12 @@ # Testing infra + contributors for a-mir-formality -| Metadata | | -| -------- | -------------- | -| Owner(s) | @nikomatsakis | -| Teams | [types] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @nikomatsakis | +| Teams | [types] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#122] | + ## Summary @@ -55,4 +57,4 @@ We will require participation from at least 2 other members of T-types. Current ### What do I do with this space? -*This is a good place to elaborate on your reasoning above -- for example, why did you put the design axioms in the order that you did? It's also a good place to put the answers to any questions that come up during discussion. The expectation is that this FAQ section will grow as the goal is discussed and eventually should contain a complete summary of the points raised along the way.* +*This is a good place to elaborate on your reasoning above -- for example, why did you put the design axioms in the order that you did? It's also a good place to put the answers to any questions that come up during discussion. The expectation is that this FAQ section will grow as the goal is discussed and eventually should contain a complete summary of the points raised along the way.* \ No newline at end of file diff --git a/src/2024h2/annotate-snippets.md b/src/2024h2/annotate-snippets.md index 6264542..7bb9ee1 100644 --- a/src/2024h2/annotate-snippets.md +++ b/src/2024h2/annotate-snippets.md @@ -1,10 +1,12 @@ # Use annotate-snippets for rustc diagnostic output -| Metadata | | -| -------- | -------------------- | -| Owner(s) | @estebank, @Muscraft | -| Teams | [compiler] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @estebank, @Muscraft | +| Teams | [compiler] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#123] | + ## Summary @@ -84,4 +86,4 @@ This section defines the specific work items that are planned and who is expecte *This is a good place to elaborate on your reasoning above -- for example, why did you put the design axioms in the order that you did? It's also a good place to put the answers to any questions that come up during discussion. The expectation is that this FAQ section will grow as the goal is discussed and eventually should contain a complete summary of the points raised along the way.* -[cargo-lints]: https://github.com/rust-lang/cargo/issues/12235 +[cargo-lints]: https://github.com/rust-lang/cargo/issues/12235 \ No newline at end of file diff --git a/src/2024h2/async.md b/src/2024h2/async.md index f62b887..b57e93f 100644 --- a/src/2024h2/async.md +++ b/src/2024h2/async.md @@ -1,11 +1,13 @@ ## Bring the Async Rust experience closer to parity with sync Rust -| Metadata | | -| ----------- | -------------------------- | -| Short title | Async | -| Owner(s) | @tmandry, @nikomatsakis | -| Teams | [lang], [libs], [libs-api] | -| Status | Flagship | +| Metadata | | +| --- | --- | +| Short title | Async | +| Owner(s) | @tmandry, @nikomatsakis | +| Teams | [lang], [libs], [libs-api] | +| Status | Flagship | +| Tracking issue | [rust-lang/rust-project-goals#105] | + ## Summary @@ -257,4 +259,4 @@ Yes, we do, and the [existing document][avd] has been very helpful in understand Keyword generics is an ambitious initiative to enable code that is "maybe async". It has generated significant controversy, with some people feeling it is necessary for Rust to scale and others judging it to be overly complex. One of the reasons to [reorganize the async WG](#reorganize-the-async-wg) is to help us come to a consensus around this point (though this topic is broader than async). [MCP 727]: https://github.com/rust-lang/compiler-team/issues/727 -[sb]: https://smallcultfollowing.com/babysteps/blog/2023/02/01/async-trait-send-bounds-part-1-intro/ +[sb]: https://smallcultfollowing.com/babysteps/blog/2023/02/01/async-trait-send-bounds-part-1-intro/ \ No newline at end of file diff --git a/src/2024h2/cargo-script.md b/src/2024h2/cargo-script.md index f4676dc..7920ffc 100644 --- a/src/2024h2/cargo-script.md +++ b/src/2024h2/cargo-script.md @@ -1,10 +1,12 @@ # Stabilize cargo-script -| Metadata | | -| -------- | --------------- | -| Owner(s) | @epage | -| Teams | [cargo], [lang] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @epage | +| Teams | [cargo], [lang] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#119] | + ## Summary @@ -69,4 +71,4 @@ This section defines the specific work items that are planned and who is expecte | Subgoal | Owner(s) or team(s) | Notes | | ---------------------- | ------------------------ | ----- | | Implementation | @epage | | -| Stabilization decision | ![Team][] [lang] [cargo] | | +| Stabilization decision | ![Team][] [lang] [cargo] | | \ No newline at end of file diff --git a/src/2024h2/cargo-semver-checks.md b/src/2024h2/cargo-semver-checks.md index 289996c..ad8f5c8 100644 --- a/src/2024h2/cargo-semver-checks.md +++ b/src/2024h2/cargo-semver-checks.md @@ -1,10 +1,12 @@ # Begin resolving `cargo-semver-checks` blockers for merging into cargo -| Metadata | | -| -------- | ------------------------------------------------------------ | -| Owner(s) | @obi1kenobi | -| Teams | [cargo] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @obi1kenobi | +| Teams | [cargo] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#104] | + ## Summary @@ -151,4 +153,4 @@ On the maintenance side, `cargo-semver-checks` lints are written in a declarativ This makes maintenance much easier: updating to a new rustdoc JSON format usually requires just a few lines of code, instead of "a few lines of code apiece in each of hundreds of lints." [semverver]: https://github.com/rust-lang/rust-semverver -[trustfall]: https://github.com/obi1kenobi/trustfall +[trustfall]: https://github.com/obi1kenobi/trustfall \ No newline at end of file diff --git a/src/2024h2/const-traits.md b/src/2024h2/const-traits.md index 9e892f1..2e48761 100644 --- a/src/2024h2/const-traits.md +++ b/src/2024h2/const-traits.md @@ -1,10 +1,12 @@ # Const traits -| Metadata | | -| -------- | --------------- | -| Owner(s) | @fee1-dead | -| Teams | [types], [lang] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @fee1-dead | +| Teams | [types], [lang] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#106] | + ## Summary diff --git a/src/2024h2/doc_cfg.md b/src/2024h2/doc_cfg.md index 04b6c61..c5390c9 100644 --- a/src/2024h2/doc_cfg.md +++ b/src/2024h2/doc_cfg.md @@ -1,10 +1,12 @@ # Stabilize doc_cfg -| Metadata | | -| -------- | --------------- | -| Owner(s) | @GuillaumeGomez | -| Teams | [rustdoc] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @GuillaumeGomez | +| Teams | [rustdoc] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#120] | + @GuillaumeGomez: https://github.com/GuillaumeGomez @@ -53,4 +55,4 @@ N/A ## Frequently asked questions -None yet. +None yet. \ No newline at end of file diff --git a/src/2024h2/ergonomic-rc.md b/src/2024h2/ergonomic-rc.md index 8614398..3c755b9 100644 --- a/src/2024h2/ergonomic-rc.md +++ b/src/2024h2/ergonomic-rc.md @@ -1,10 +1,12 @@ # Ergonomic ref-counting -| Metadata | | -| -------- | ------------------ | -| Owner(s) | @jkelleyrtp | -| Teams | [lang], [libs-api] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @jkelleyrtp | +| Teams | [lang], [libs-api] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#107] | + ## Summary @@ -127,4 +129,4 @@ The primary project support will be design bandwidth from the [lang team]. ### After this, are we done? Will high-level Rust be great? -Accepting this goal only implies alignment around reducing (or eliminating entirely) the need for explicit clones for reference-counted data. For people attempting to use Rust as part of higher-level frameworks like Dioxus, this is an important step, but one that would hopefully be followed by further ergonomics work. Examples of language changes that would be helpful are described in the (not accepted) goals around a renewed [ergonomics initiative](./ergonomics-initiative.md) and [improve compilation speed](./faster-iterative-builds.md). +Accepting this goal only implies alignment around reducing (or eliminating entirely) the need for explicit clones for reference-counted data. For people attempting to use Rust as part of higher-level frameworks like Dioxus, this is an important step, but one that would hopefully be followed by further ergonomics work. Examples of language changes that would be helpful are described in the (not accepted) goals around a renewed [ergonomics initiative](./ergonomics-initiative.md) and [improve compilation speed](./faster-iterative-builds.md). \ No newline at end of file diff --git a/src/2024h2/merged-doctests.md b/src/2024h2/merged-doctests.md index 3806182..d2753a2 100644 --- a/src/2024h2/merged-doctests.md +++ b/src/2024h2/merged-doctests.md @@ -1,10 +1,12 @@ # Implement "merged doctests" to save doctest time -| Metadata | | -| -------- | --------------- | -| Owner(s) | @GuillaumeGomez | -| Teams | [rustdoc] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @GuillaumeGomez | +| Teams | [rustdoc] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#111] | + @GuillaumeGomez: https://github.com/GuillaumeGomez @@ -39,4 +41,4 @@ N/A ## Frequently asked questions -None yet. +None yet. \ No newline at end of file diff --git a/src/2024h2/min_generic_const_arguments.md b/src/2024h2/min_generic_const_arguments.md index 9659711..0d8a5ff 100644 --- a/src/2024h2/min_generic_const_arguments.md +++ b/src/2024h2/min_generic_const_arguments.md @@ -1,10 +1,12 @@ # "Stabilizable" prototype for expanded const generics -| Metadata | | -| -------- | -------- | -| Owner(s) | @BoxyUwU | -| Teams | [types] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @BoxyUwU | +| Teams | [types] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#100] | + ## Summary diff --git a/src/2024h2/next-solver.md b/src/2024h2/next-solver.md index b426a39..0ce5412 100644 --- a/src/2024h2/next-solver.md +++ b/src/2024h2/next-solver.md @@ -1,10 +1,12 @@ # Next-generation trait solver -| Metadata | | -| -------- | -------- | -| Owner(s) | @lcnr | -| Teams | [types] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @lcnr | +| Teams | [types] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#113] | + ## Summary @@ -92,4 +94,4 @@ See next few steps :3 *This is a good place to elaborate on your reasoning above -- for example, why did you put the design axioms in the order that you did? It's also a good place to put the answers to any questions that come up during discussion. The expectation is that this FAQ section will grow as the goal is discussed and eventually should contain a complete summary of the points raised along the way.* -[unsoundnesses]: https://github.com/orgs/rust-lang/projects/44 +[unsoundnesses]: https://github.com/orgs/rust-lang/projects/44 \ No newline at end of file diff --git a/src/2024h2/optimize-clippy.md b/src/2024h2/optimize-clippy.md index c6a2158..1db2868 100644 --- a/src/2024h2/optimize-clippy.md +++ b/src/2024h2/optimize-clippy.md @@ -1,11 +1,13 @@ # Optimizing Clippy & linting (a.k.a The Clippy Performance Project) -| Metadata | | -| -------- | -------- | -| Owner(s) | @blyxyas | -| Teams | [clippy] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @blyxyas | +| Teams | [clippy] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#114] | + ## Summary @@ -68,4 +70,4 @@ A developer shouldn't have to get a high-end machine to run a compiler swiftly; [poll-reddit]: https://www.reddit.com/r/rust/comments/1dxu43p/feedback_poll_where_how_do_you_use_clippy/ [poll-mastodon]: https://tech.lgbt/@blyxyas/112747808297589676 [prettier]: https://github.com/prettier/prettier -[ruff]: https://github.com/astral-sh/ruff +[ruff]: https://github.com/astral-sh/ruff \ No newline at end of file diff --git a/src/2024h2/parallel-front-end.md b/src/2024h2/parallel-front-end.md index 5c7afa5..b0c042f 100644 --- a/src/2024h2/parallel-front-end.md +++ b/src/2024h2/parallel-front-end.md @@ -1,10 +1,12 @@ # Stabilize parallel front end -| Metadata | | -| -------- | ----------- | -| Owner(s) | @SparrowLii | -| Teams | [compiler] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @SparrowLii | +| Teams | [compiler] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#121] | + ## Summary diff --git a/src/2024h2/pubgrub-in-cargo.md b/src/2024h2/pubgrub-in-cargo.md index b186633..e8730c7 100644 --- a/src/2024h2/pubgrub-in-cargo.md +++ b/src/2024h2/pubgrub-in-cargo.md @@ -1,10 +1,12 @@ # Extend pubgrub to match cargo's dependency resolution -| Metadata | | -| -------- | -------- | -| Owner(s) | @eh2406 | -| Teams | [cargo] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @eh2406 | +| Teams | [cargo] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#110] | + ## Summary @@ -70,4 +72,4 @@ There are some crates where pubgrub takes a long time to do resolution, and many ### If the existing resolver defines correct behavior then how does a rewrite help? -Unless we find critical bugs with the existing resolver, the new resolver and cargo's resolver should be 100% compatible. This means that any observable behavior from the existing resolver will need to be matched in the new resolver. The benefits of this work will come not from changes in behavior, but from a more flexible, reusable, testable, and maintainable code base. For example: the base `pubgrub` crate solves a simpler version of the dependency resolution problem. This allows for a more structured internal algorithm which enables complete error messages. It's also general enough not only to be used in cargo but also in other package managers. We already have contributions from the maintainers of [`uv`](https://pypi.org/project/uv/) who **are** using the library in production. +Unless we find critical bugs with the existing resolver, the new resolver and cargo's resolver should be 100% compatible. This means that any observable behavior from the existing resolver will need to be matched in the new resolver. The benefits of this work will come not from changes in behavior, but from a more flexible, reusable, testable, and maintainable code base. For example: the base `pubgrub` crate solves a simpler version of the dependency resolution problem. This allows for a more structured internal algorithm which enables complete error messages. It's also general enough not only to be used in cargo but also in other package managers. We already have contributions from the maintainers of [`uv`](https://pypi.org/project/uv/) who **are** using the library in production. \ No newline at end of file diff --git a/src/2024h2/rfl_stable.md b/src/2024h2/rfl_stable.md index fb92548..bf20291 100644 --- a/src/2024h2/rfl_stable.md +++ b/src/2024h2/rfl_stable.md @@ -1,11 +1,13 @@ # Resolve the biggest blockers to Linux building on stable Rust -| Metadata | | -| ----------- | ------------------------------ | -| Short title | Rust-for-Linux | -| Owner(s) | @nikomatsakis, @joshtriplett | -| Teams | [lang], [libs-api], [compiler] | -| Status | Flagship | +| Metadata | | +| --- | --- | +| Short title | Rust-for-Linux | +| Owner(s) | @nikomatsakis, @joshtriplett | +| Teams | [lang], [libs-api], [compiler] | +| Status | Flagship | +| Tracking issue | [rust-lang/rust-project-goals#116] | + ## Summary @@ -189,4 +191,3 @@ Here is a detailed list of the work to be done and who is expected to do it. Thi None yet. - diff --git a/src/2024h2/rustdoc-search.md b/src/2024h2/rustdoc-search.md index bad616c..e6a07a8 100644 --- a/src/2024h2/rustdoc-search.md +++ b/src/2024h2/rustdoc-search.md @@ -1,10 +1,12 @@ # Make Rustdoc Search easier to learn -| Metadata | | -| -------- | ----------------------------- | -| Owner(s) | @notriddle | -| Teams | [rustdoc], [rustdoc-frontend] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @notriddle | +| Teams | [rustdoc], [rustdoc-frontend] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#112] | + ## Summary @@ -104,4 +106,4 @@ Docs.rs can do it if they want, but @notriddle isn't signing up for a full-time ### Full-text search when? -That path is pretty rough. [Bugs](https://github.com/rust-lang/mdBook/issues/1286), [enormous size](https://github.com/elixir-lang/ex_doc/issues/1732), and contentious decisions on how to handle synonyms abound. +That path is pretty rough. [Bugs](https://github.com/rust-lang/mdBook/issues/1286), [enormous size](https://github.com/elixir-lang/ex_doc/issues/1732), and contentious decisions on how to handle synonyms abound. \ No newline at end of file diff --git a/src/2024h2/sandboxed-build-script.md b/src/2024h2/sandboxed-build-script.md index 498e9a9..5a789dd 100644 --- a/src/2024h2/sandboxed-build-script.md +++ b/src/2024h2/sandboxed-build-script.md @@ -1,10 +1,12 @@ # Explore sandboxed build scripts -| Metadata | | -| -------- | ---------- | -| Owner(s) | @weihanglo | -| Teams | [cargo] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @weihanglo | +| Teams | [cargo] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#108] | + ## Summary @@ -218,4 +220,4 @@ For example, Bazel provides a [sandboxing feature](https://bazel.build/docs/sand Nix also has a [sandbox build](https://nix.dev/manual/nix/2.23/command-ref/conf-file.html#conf-sandbox) via a different approach. Yet, migrating to existing solutions will be a long-term effort for the entire community. It requires extensive exploration and discussions from both social and technical aspects. -At this moment, I don't think the Cargo team and the Rust community are ready for a migration. +At this moment, I don't think the Cargo team and the Rust community are ready for a migration. \ No newline at end of file diff --git a/src/2024h2/std-verification.md b/src/2024h2/std-verification.md index 56d6107..0ddfc3a 100644 --- a/src/2024h2/std-verification.md +++ b/src/2024h2/std-verification.md @@ -1,10 +1,12 @@ # Survey tools suitability for Std safety verification -| Metadata | | -| -------- |-----------| -| Owner(s) | @celinval | -| Teams | [Libs] | -| Status | Accepted | +| Metadata | | +| --- | --- | +| Owner(s) | @celinval | +| Teams | [Libs] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#126] | + ## Summary @@ -144,4 +146,3 @@ Besides contracts, these changes may include extra harnesses, lemmas, ghost-code the standard library. ## Frequently asked questions - diff --git a/src/2024h2/user-wide-cache.md b/src/2024h2/user-wide-cache.md index c7d7482..5e8ad9b 100644 --- a/src/2024h2/user-wide-cache.md +++ b/src/2024h2/user-wide-cache.md @@ -1,10 +1,12 @@ # User-wide build cache -| Metadata | | -| -------- | ---------------- | -| Owner(s) | ![Help wanted][] | -| Teams | [cargo] | -| Status | Orphaned | +| Metadata | | +| --- | --- | +| Owner(s) | ![Help wanted][] | +| Teams | [cargo] | +| Status | Orphaned | +| Tracking issue | [rust-lang/rust-project-goals#124] | + ## Summary @@ -152,4 +154,4 @@ In short, yes. This is a milestone on the way to remote caches. Remote caches allows access to CI build caches for the same project you are developing on, -allowing full reuse at the cost of network access. +allowing full reuse at the cost of network access. \ No newline at end of file diff --git a/src/2024h2/yank-crates-with-a-reason.md b/src/2024h2/yank-crates-with-a-reason.md index a955401..e05a684 100644 --- a/src/2024h2/yank-crates-with-a-reason.md +++ b/src/2024h2/yank-crates-with-a-reason.md @@ -1,10 +1,13 @@ -# Administrator-provided reasons for yanked crates +# Provided reasons for yanked crates + +| Metadata | | +| --- | --- | +| Owner(s) | @Rustin170506 | +| Teams | [crates-io], [cargo] | +| Status | Accepted | +| Tracking issue | [rust-lang/rust-project-goals#101] | + -| Metadata | | -| -------- | -------------------- | -| Owner(s) | @hi-rustin | -| Teams | [crates-io], [cargo] | -| Status | Accepted | ## Summary @@ -48,19 +51,19 @@ When considering this feature, we need to balance our desire for a perfect, stru **Owner:** -* @hi-rustin: wearing my crates.io team member's hat -* @hi-rustin: wearing my Cargo regular contributor's hat +* @Rustin170506: wearing my crates.io team member's hat +* @Rustin170506: wearing my Cargo regular contributor's hat | Subgoal | Owner(s) or team(s) | Notes | | ----------------------------------------- | ------------------------------ | ----- | | Yank crates with a reason | | | -| ↳ Implementation | @hi-rustin | | +| ↳ Implementation | @Rustin170506 | | | ↳ Standard reviews | ![Team][] [crates-io] | | | ↳ Try it out in crates.io | ![Team][] [crates-io] | | -| ↳ Author RFC | @hi-rustin | | +| ↳ Author RFC | @Rustin170506 | | | ↳ Approve RFC | ![Team][] [cargo], [crates-io] | | -| ↳ Implementation in Cargo side | @hi-rustin | | -| ↳ Inside Rust blog post inviting feedback | @hi-rustin | | +| ↳ Implementation in Cargo side | @Rustin170506 | | +| ↳ Inside Rust blog post inviting feedback | @Rustin170506 | | | ↳ Stabilization decision | ![Team][] [cargo] | | [TBD]: https://img.shields.io/badge/TBD-red @@ -70,4 +73,4 @@ When considering this feature, we need to balance our desire for a perfect, stru ### What might we do next? -We could start with plain text messages, but in the future we could consider designing it as structured data. This way, in addition to displaying it to Cargo users, we can also make it available to more crates-related platforms for data integration and use. +We could start with plain text messages, but in the future we could consider designing it as structured data. This way, in addition to displaying it to Cargo users, we can also make it available to more crates-related platforms for data integration and use. \ No newline at end of file diff --git a/src/SUMMARY.md b/src/SUMMARY.md index b354776..8431ff2 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -29,5 +29,6 @@ # 🔧 Running the goals program +* [Overall setup](./admin/setup.md) * [Mdbook plugin details](./admin/mdbook_plugin.md) * [Commands you can run](./admin/commands.md) \ No newline at end of file diff --git a/src/admin/setup.md b/src/admin/setup.md new file mode 100644 index 0000000..8d74ca4 --- /dev/null +++ b/src/admin/setup.md @@ -0,0 +1,20 @@ +# Overall setup + +The rust-project-goals repository is set up as follows + +* an mdbook for generating the main content +* a Rust binary in `src` that serves as + * a runnable utility for doing various admin functions on the CLI (e.g., generating a draft RFC) + * an mdbook preprocessor for generating content like the list of goals + * a utility invoked in CI that can query github and produce a JSON with the goal status +* pages on the Rust website that fetches JSON data from rust-project-goals repo to generate content + * the JSON data is generated by the Rust binary +* tracking issues for each active project goal: + * tagged with `C-tracking-issue` + * and added to the appropriate milestone +* triagebot modifications to link Zulip and the repo tracking issues + * the command `@triagebot ping-goals N D` will ping all active goal owners to ask them to add updates + * *N* is a threshold number of days; if people have posted an update within the last N days, we won't bother them. Usually I do this as the current date + 7, so that people who posted during the current month or the last week of the previous month don't get any pings. + * *D* is a word like `Sep-22` that indicates the day + * the bot monitors for comments on github and forwards them to Zulip +