Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
614 changes: 307 additions & 307 deletions libcxx/docs/Status/Cxx17Issues.csv

Large diffs are not rendered by default.

210 changes: 105 additions & 105 deletions libcxx/docs/Status/Cxx17Papers.csv

Large diffs are not rendered by default.

584 changes: 292 additions & 292 deletions libcxx/docs/Status/Cxx20Issues.csv

Large diffs are not rendered by default.

390 changes: 195 additions & 195 deletions libcxx/docs/Status/Cxx20Papers.csv

Large diffs are not rendered by default.

600 changes: 300 additions & 300 deletions libcxx/docs/Status/Cxx23Issues.csv

Large diffs are not rendered by default.

228 changes: 114 additions & 114 deletions libcxx/docs/Status/Cxx23Papers.csv

Large diffs are not rendered by default.

288 changes: 144 additions & 144 deletions libcxx/docs/Status/Cxx2cIssues.csv

Large diffs are not rendered by default.

302 changes: 151 additions & 151 deletions libcxx/docs/Status/Cxx2cPapers.csv

Large diffs are not rendered by default.

44 changes: 39 additions & 5 deletions libcxx/utils/synchronize_csv_status_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ class PaperInfo:
First version of LLVM in which this paper/issue was resolved.
"""

github_issue: Optional[str]
"""
Optional number of the Github issue tracking the implementation status of this paper.
This is used to cross-reference rows in the status pages with Github issues.
"""

notes: Optional[str]
"""
Optional plain text string representing notes to associate to the paper.
Expand All @@ -170,23 +176,26 @@ def __init__(self, paper_number: str, paper_name: str,
status: PaperStatus,
meeting: Optional[str] = None,
first_released_version: Optional[str] = None,
github_issue: Optional[str] = None,
notes: Optional[str] = None,
original: Optional[object] = None):
self.paper_number = paper_number
self.paper_name = paper_name
self.status = status
self.meeting = meeting
self.first_released_version = first_released_version
self.github_issue = github_issue
self.notes = notes
self.original = original

def for_printing(self) -> Tuple[str, str, str, str, str, str]:
def for_printing(self) -> Tuple[str, str, str, str, str, str, str]:
return (
f'`{self.paper_number} <https://wg21.link/{self.paper_number}>`__',
self.paper_name,
self.meeting if self.meeting is not None else '',
self.status.to_csv_entry(),
self.first_released_version if self.first_released_version is not None else '',
f'`#{self.github_issue} <https://github.com/llvm/llvm-project/issues/{self.github_issue}>`__' if self.github_issue is not None else '',
self.notes if self.notes is not None else '',
)

Expand All @@ -203,13 +212,19 @@ def from_csv_row(row: Tuple[str, str, str, str, str, str]):# -> PaperInfo:
if match is None:
raise RuntimeError(f"Can't parse paper/issue number out of row: {row}")

# Match the issue number if present
github_issue = re.search(r'#([0-9]+)', row[5])
if github_issue:
github_issue = github_issue.group(1)

return PaperInfo(
paper_number=match.group(1),
paper_name=row[1],
status=PaperStatus.from_csv_entry(row[3]),
meeting=row[2] or None,
first_released_version=row[4] or None,
notes=row[5] or None,
github_issue=github_issue,
notes=row[6] or None,
original=row,
)

Expand All @@ -235,6 +250,7 @@ def from_github_issue(issue: Dict):# -> PaperInfo:
status=PaperStatus.from_github_issue(issue),
meeting=issue.get('meeting Voted', None),
first_released_version=None, # TODO
github_issue=str(issue['content']['number']),
notes=notes,
original=issue,
)
Expand All @@ -252,19 +268,24 @@ def merge(paper: PaperInfo, gh: PaperInfo) -> PaperInfo:
is not useful.

In case we don't update the CSV row's status, we still take any updated notes coming
from the Github issue.
from the Github issue and we add a link to the Github issue if it was previously missing.
"""
took_gh_in_full = False # Whether we updated the entire PaperInfo from the Github version
if paper.status == PaperStatus(PaperStatus.TODO) and gh.status == PaperStatus(PaperStatus.IN_PROGRESS):
result = copy.deepcopy(paper)
result.notes = gh.notes
elif paper.status < gh.status:
result = copy.deepcopy(gh)
took_gh_in_full = True
elif paper.status == gh.status:
result = copy.deepcopy(paper)
result.notes = gh.notes
else:
print(f"We found a CSV row and a Github issue with different statuses:\nrow: {paper}\nGithub issue: {gh}")
result = copy.deepcopy(paper)

# If we didn't take the Github issue in full, make sure to update the notes, the link and anything else.
if not took_gh_in_full:
result.github_issue = gh.github_issue
result.notes = gh.notes
return result

def load_csv(file: pathlib.Path) -> List[Tuple]:
Expand All @@ -285,6 +306,8 @@ def create_github_issue(paper: PaperInfo, labels: List[str]) -> None:
"""
Create a new Github issue representing the given PaperInfo.
"""
assert paper.github_issue is None, "Trying to create a Github issue for a paper that is already tracked"

paper_name = paper.paper_name.replace('``', '`').replace('\\', '')

create_cli = ['gh', 'issue', 'create', '--repo', 'llvm/llvm-project',
Expand Down Expand Up @@ -363,6 +386,17 @@ def sync_csv(rows: List[Tuple], from_github: List[PaperInfo], create_new: bool,
results.append(row)
continue

# Validate the Github issue associated to the CSV row, if any
if paper.github_issue is not None:
if len(tracking) == 0:
print(f"Found row claiming to have a tracking issue, but failed to find a tracking issue on Github: {row}")
results.append(row)
continue
if len(tracking) == 1 and paper.github_issue != tracking[0].github_issue:
print(f"Found row with incorrect tracking issue: {row}\ntracked by: {tracking[0]}")
results.append(row)
continue

# If there is no tracking issue for that row and we are creating new issues, do that.
# Otherwise just log that we're missing an issue.
if len(tracking) == 0:
Expand Down
Loading