-
Notifications
You must be signed in to change notification settings - Fork 24
Add Claude.md #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Claude.md #112
Conversation
|
I've assigned @joostjager as a reviewer! |
joostjager
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you see claude change behavior with this file present?
|
Apparently this file is loaded into the context at the start of every session. Recommendation is too keep it short and only have it contain non-obvious things. |
Used /init in claude code to make initial structure than added some notes myself.
7ac7495 to
54f6dd2
Compare
|
Simplified claude.md a lot and made a contributing.md that has more details |
tnull
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, one question though.
CONTRIBUTING.md
Outdated
| RUSTFLAGS="--cfg genproto" cargo build -p ldk-server-protos | ||
| ``` | ||
|
|
||
| After regenerating, you must manually readd the copyright header to each generated file in `ldk-server-protos/src/` ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a script to do this, or even just do it as part of build.rs? This would help us, but also help Claude not mess something up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there even a real reason to include the header in generated code? Not familiar with the legal situation around copyright headers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also not super familiar, but I do like the simplicity of a "every .rs file should have a copyright header" policy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
ldk-server-protos/build.rs
Outdated
| for file in &["api.rs", "types.rs", "events.rs", "error.rs"] { | ||
| let from_path = Path::new(&out_dir).join(file); | ||
| let content = fs::read_to_string(&from_path).unwrap(); | ||
| let with_header = format!("{}{}", COPYRIGHT_HEADER, content); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, let's just open the the file in append mode and to two writes? (cf. https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#method.append)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, it wasn't working with append mode but just does it as 2 writes
3824b86 to
749e2ff
Compare
Used
/initin claude code to make initial structure than added some notes myself.