-
Notifications
You must be signed in to change notification settings - Fork 43
revamp user guides #1257
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
revamp user guides #1257
Conversation
🦋 Changeset detectedLatest commit: bedda10 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Looks good! I think it would be valuable to have, in addition to these, some short tutorials/examples around common workflows. Things like "producing a list of function names in a contract", or "finding all calls to a function". The information needed to understand how to do this is available within the guides in this PR, but if we could facilitate discovery by working from common user needs (what they will have in mind when they open the docs), then that would be a great easy entry point for new users to explore Slang quickly. Those shorter examples should link to the longer doc pieces that go more in depth about the things being used |
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.
Left some suggestions.
documentation/public/user-guide/06-query-language/02-executing-queries/index.md
Outdated
Show resolved
Hide resolved
documentation/public/user-guide/06-query-language/02-executing-queries/index.md
Outdated
Show resolved
Hide resolved
documentation/public/user-guide/07-semantic-analysis/01-compilation-units/index.md
Show resolved
Hide resolved
documentation/public/user-guide/07-semantic-analysis/01-compilation-units/index.md
Show resolved
Hide resolved
documentation/public/user-guide/07-semantic-analysis/01-compilation-units/index.md
Show resolved
Hide resolved
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, Omar! Looks great! I left a couple questions / suggestions.
documentation/public/user-guide/07-semantic-analysis/01-compilation-units/index.md
Show resolved
Hide resolved
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.
Just a few little comments. This is gold!
documentation/public/user-guide/05-syntax-trees/03-using-ast-types/index.md
Outdated
Show resolved
Hide resolved
documentation/public/user-guide/07-semantic-analysis/02-binding-graph/index.md
Show resolved
Hide resolved
documentation/public/user-guide/07-semantic-analysis/common/compilation-builder.mts
Outdated
Show resolved
Hide resolved
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.
Left a couple of non-blocking comments, but otherwise looks good!
- 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.
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.
I added some minor improvements, like links to grammar and small English issues.
documentation/public/user-guide/05-syntax-trees/01-parsing-source-code/index.md
Show resolved
Hide resolved
documentation/public/user-guide/05-syntax-trees/01-parsing-source-code/index.md
Show resolved
Hide resolved
documentation/public/user-guide/05-syntax-trees/03-navigating-with-cursors/index.md
Show resolved
Hide resolved
documentation/public/user-guide/05-syntax-trees/03-navigating-with-cursors/index.md
Show resolved
Hide resolved
documentation/public/user-guide/06-query-language/01-query-syntax/index.md
Show resolved
Hide resolved
documentation/public/user-guide/06-query-language/01-query-syntax/index.md
Show resolved
Hide resolved
documentation/public/user-guide/06-query-language/02-executing-queries/index.md
Show resolved
Hide resolved
documentation/public/user-guide/06-query-language/02-executing-queries/index.md
Show resolved
Hide resolved
documentation/public/user-guide/06-query-language/02-executing-queries/index.md
Show resolved
Hide resolved
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @nomicfoundation/slang@0.20.0 ### Minor Changes - [#1203](#1203) [`a5c3b1a`](a5c3b1a) Thanks [@ggiraldez](https://github.com/ggiraldez)! - add separate contexts (ie. binding scopes) for Solidity and Yul built-ins - [#1257](#1257) [`9f5d8f0`](9f5d8f0) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - export `assertUserFileLocation()` and `assertBuiltInLocation()` utilities from the `bindings` module - [#1243](#1243) [`99d182f`](99d182f) Thanks [@ggiraldez](https://github.com/ggiraldez)! - add `definition.references()` API to find all references that resolve to a definition. - [#1205](#1205) [`103b331`](103b331) Thanks [@mjoerussell](https://github.com/mjoerussell)! - Make `Edge::label` a required field instead of being optional. - [#1257](#1257) [`9f5d8f0`](9f5d8f0) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - update user guides with new binding graph and compilation APIs - [#1257](#1257) [`9f5d8f0`](9f5d8f0) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - export `assertNonterminalNode()` and `assertTerminalNode()` utilities from the `cst` module ### Patch Changes - [#1246](#1246) [`aea2dd0`](aea2dd0) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - unreserve `jump` and `jumpi` yul keywords between `0.6.0` and `0.8.0` - [#1203](#1203) [`a5c3b1a`](a5c3b1a) Thanks [@ggiraldez](https://github.com/ggiraldez)! - enable `address payable` from 0.5.0 and remove `transfer` built-in from non-payable `address`es - [#1246](#1246) [`aea2dd0`](aea2dd0) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - make sure assembly flags are only enabled starting from `0.8.13` - [#1246](#1246) [`aea2dd0`](aea2dd0) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - enable yul's `true` and `false` keywords starting from `0.6.2` - [#1246](#1246) [`aea2dd0`](aea2dd0) Thanks [@OmarTawfik](https://github.com/OmarTawfik)! - make sure `super` and `this` keywords are unreserved before `0.8.0`. Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- apply remaining suggestions from NomicFoundation#1257 - add grammar links to any remaining node names in user guides - change query hilighting language to `smalltalk` as it is more readable
- apply remaining suggestions from #1257 - add grammar links to any remaining node names in user guides - change query hilighting language to `smalltalk` as it is more readable
QueryMatch
root cursor was not exposed via WITnoUncheckedIndexedAccess
tsconfig check, since it was adding more noise pollution to the examples than it is useful (cc @mjoerussell as you mentioned this before)