chore: repo and code upgrades - #2479
Conversation
8e93f2d to
ea49be1
Compare
551bc9f to
1e69294
Compare
1e69294 to
340aaa0
Compare
| // add swap note's tag to client2 | ||
| // we could technically avoid this step, but for the first iteration of swap notes we'll | ||
| // require to manually add tags | ||
| // add swap note's tag to client2 we could technically avoid this step, but for the first |
There was a problem hiding this comment.
| // add swap note's tag to client2 we could technically avoid this step, but for the first | |
| // add swap note's tag to client2, we could technically avoid this step, but for the first |
|
|
||
| // sync on client 2, we should get the swap note | ||
| // consume swap note with accountB, and check that the vault changed appropriately | ||
| // sync on client 2, we should get the swap note consume swap note with accountB, and check that |
There was a problem hiding this comment.
| // sync on client 2, we should get the swap note consume swap note with accountB, and check that | |
| // sync on client 2, we should get the swap note, consume swap note with accountB, and check that |
| // There's no need to retrieve it separately. | ||
| // let script_root = row.get(0)?; | ||
| // The script root can be derived from the script itself. There's no need to retrieve it | ||
| // separately. let script_root = row.get(0)?; |
There was a problem hiding this comment.
I think the last bit of this doc is actuall disabled code.
| // separately. let script_root = row.get(0)?; | |
| // separately. |
| .PHONY: format | ||
| format: ## Run format using nightly toolchain | ||
| format: ## Reflow comments, then run format using nightly toolchain | ||
| cargo xtask fmt-comments --write |
There was a problem hiding this comment.
xtask runs before rustfmt, so it computes each comment's width from the indentation the file has before rustfmt settles it. When rustfmt then re-indents that comment, the wrap it already computed no longer matches the new column, and the line could end up over comment_width, causing the format check to fail.
There was a problem hiding this comment.
Good catch, I had the original command ordering based on the node's changes but swapping them avoids this, so I ended up doing that.
|
|
||
| let mut words = Vec::new(); | ||
| for line in block { | ||
| let text = safe_comment_text(&line.content)?; |
There was a problem hiding this comment.
If I'm understanding correctly, the ? here returns from reflow_block, so when one line is rejected by safe_comment_text the whole block is skipped and not only that line. An empty /// line is rejected, so, for example, a doc comment with a summary, an empty line and a body is never reflowed. And with wrap_comments = false nothing else checks comment_width there. Is that intended?
There was a problem hiding this comment.
True as well. Made it so empty comment lines are paragraph boundaries, and also so fenced blocks are left untouched. The paragraph split had exposed doctest code so the diff grew with more reformatting.
I think a structural line still causes the whole paragraph to be skipped intentionally and that's fine, since lists, tables, and code-adjacent comments aren't necessarily text you want to readjust.
0bdfd5b to
6390d46
Compare
6390d46 to
2707a41
Compare
|
I think all comments got addressed, so this should be ready for another round of reviews |
Closes #2471 and supersedes #2472.
cargo xtask fmt-comments: ports feat: xtask for reflowing comments node#2099. Adds tree-sitter comment reflow and disablesrustfmtcomment wrapping. Reflows a bunch of comments. I'm not entirely sure we want to keep this. Stylistically a few type of changes are not fully better IMO, but there are a bunch of others where it's a clear improvement and it makes things much more consistent. I added a couple changes to the upstream script (mainly leaving note-type comments on their own lines)AGENTS.md: ports Discourage drive-by AIs node#2539, including ASD-STE100 guidance and no unrequested commits or pushes. Did a couple of tests specifically with this and seems like it's overall better. Here I expanded it to point agents to the contributing guide.All changes in different commits in case we want to roll something back