-
Notifications
You must be signed in to change notification settings - Fork 42
Add standalone examples to the user guides #1267
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
Add standalone examples to the user guides #1267
Conversation
- restructured the user guides around all v1 APIs - added guides for the newly introduced parts (compilations, bindings, and versioning utils) - added a few more examples, and a dedicated page for other projects already using Slang - removed the (hidden/disabled) Rust examples, and replaced them with TypeScript ones - fixed a minor bug where `QueryMatch` root cursor was not exposed via WIT - added some clarifications to the guides about error tolerance and how we handle it - relaxed the `noUncheckedIndexedAccess` tsconfig check, since it was adding more noise pollution to the examples than it is useful - moved the guide examples under each guide, to make it easier to edit/review them NOTE: This is missing 3 examples for binding graph/builtins, that I'm adding right now. They are currently disabled with `TODO` comments. But creating the PR now since it is a large change, and it would be good to start getting feedback.
|
The "list functions" example is missing motivation. Why anyone would need to do that? One alternative I can imagine, but it overlaps with the others, is to have basic test coverage of functions. With this in mind, then the example should change to receive a target contract and a testing contract, and the output be if every public function from the target is at least referenced once in the testing contract. Does it make sense? |
I also add here in this section, even if duplicated, the example of the
|
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.
Thank you for adding these examples, I think they are very valuable for anyone looking into using Slang!
...entation/public/user-guide/08-examples/03-jump-to-definition/examples/jump-to-definition.mts
Show resolved
Hide resolved
...user-guide/08-examples/01-list-functions-in-contract/examples/list-functions-in-contract.mts
Show resolved
Hide resolved
documentation/public/user-guide/08-examples/common/compilation-builder.mts
Show resolved
Hide resolved
documentation/public/user-guide/08-examples/02-find-usages/examples/find-usages.mts
Show resolved
Hide resolved
@ggiraldez I think the PR was closed automatically by mistake when #1257 was merged 😢 |
Yeah, that's my guess as well. No worries. I'm surprised it cannot be re-opened. I thought you could edit the base branch. I'll open another one. |
Adds a section with standalone examples to the user guide. These examples demonstrate almost all the Slang APIs. Applies on top of #1257.