Skip to content

Commit

Permalink
temporarily disable cargo publishing (#1121)
Browse files Browse the repository at this point in the history
and clean up the README and documentation links/navigation
  • Loading branch information
OmarTawfik authored Oct 25, 2024
1 parent 0affc78 commit 218acdb
Show file tree
Hide file tree
Showing 25 changed files with 46 additions and 417 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ jobs:
env: |
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
- name: "infra publish cargo"
if: "${{ steps.runChangesets.outputs.hasChangesets == 'false' }}"
uses: "./.github/actions/devcontainer/run"
with:
runCmd: "./scripts/bin/infra publish cargo"
env: |
CARGO_REGISTRY_TOKEN=${{ secrets.CARGO_REGISTRY_TOKEN }}
# __SLANG_CARGO_PUBLISH_TEMPORARILY_DISABLED__ (keep in sync)
#
# - name: "infra publish cargo"
# if: "${{ steps.runChangesets.outputs.hasChangesets == 'false' }}"
# uses: "./.github/actions/devcontainer/run"
# with:
# runCmd: "./scripts/bin/infra publish cargo"
# env: |
# CARGO_REGISTRY_TOKEN=${{ secrets.CARGO_REGISTRY_TOKEN }}

- name: "infra publish github-release"
if: "${{ steps.runChangesets.outputs.hasChangesets == 'false' }}"
Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
<!-- _PRODUCT_README_ (keep in sync) -->

[![release](https://img.shields.io/github/v/tag/NomicFoundation/slang?label=GitHub%20Release&logo=github&sort=semver&logoColor=white)](https://github.com/NomicFoundation/slang/releases)
[![crate](https://img.shields.io/crates/v/slang_solidity?label=Rust%20Crate&logo=rust&logoColor=white)](https://crates.io/crates/slang_solidity)
[![npm](https://img.shields.io/npm/v/@nomicfoundation/slang?label=NPM%20Package&logo=npm&logoColor=white)](https://www.npmjs.com/package/@nomicfoundation/slang)
[![documentation](https://img.shields.io/github/deployments/NomicFoundation/slang/github-pages?label=Documentation&logo=gitbook&logoColor=white)](https://nomicfoundation.github.io/slang)

<!--
__SLANG_CARGO_PUBLISH_TEMPORARILY_DISABLED__ (keep in sync)
[![crate](https://img.shields.io/crates/v/slang_solidity?label=Rust%20Crate&logo=rust&logoColor=white)](https://crates.io/crates/slang_solidity)
-->

## Solidity compiler tooling by [@NomicFoundation](https://github.com/NomicFoundation)

Expand All @@ -14,13 +17,17 @@ Written in Rust and distributed in multiple languages.

- [Announcement Post](https://medium.com/nomic-foundation-blog/slang-rethnet-2ad465fd7880)
- [How to write your own Solidity linter using Slang, in 25 lines of code!](https://blog.nomic.foundation/how-to-write-your-own-solidity-linter-using-slang-356e7565ad1b/)
- [Slang Internals](https://nomicfoundation.github.io/slang/latest/internals/)
- [Slang User Guide](https://nomicfoundation.github.io/slang/latest/user-guide/)

This repository maintains the source code and release process for these projects:

- [Slang Rust Crate + CLI](https://nomicfoundation.github.io/slang/latest/user-guide/rust-crate/)
- [Slang TypeScript Package](https://nomicfoundation.github.io/slang/latest/user-guide/npm-package/)
- [Solidity Language Specification](https://nomicfoundation.github.io/slang/latest/solidity-specification/)
- [Slang NPM Package](https://www.npmjs.com/package/@nomicfoundation/slang/)

<!--
__SLANG_CARGO_PUBLISH_TEMPORARILY_DISABLED__ (keep in sync)
- [Slang Rust Crate](https://crates.io/crates/slang_solidity/)
-->

> ❗ This project is still in alpha, and is under active development.
> If you are planning on using it, please [reach out to us on Telegram](https://t.me/+pxApdT-Ssn5hMTFh) so we can help you get started.
Expand Down
7 changes: 6 additions & 1 deletion crates/infra/cli/src/commands/publish/cargo/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::iter::once;
use std::path::Path;

use anyhow::Result;
use anyhow::{ensure, Result};
use clap::Parser;
use infra_utils::cargo::{CargoWorkspace, UserFacingCrate};
use infra_utils::commands::Command;
Expand All @@ -20,6 +20,11 @@ pub struct CargoController {

impl CargoController {
pub fn execute(&self) -> Result<()> {
ensure!(
false,
"__SLANG_CARGO_PUBLISH_TEMPORARILY_DISABLED__ (keep in sync)"
);

let mut changeset = TemporaryChangeset::new(
"infra/cargo-publish",
"prepare Cargo packages for publishing",
Expand Down
3 changes: 2 additions & 1 deletion crates/metaslang/bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
version.workspace = true
rust-version.workspace = true
edition.workspace = true
publish = true
# __SLANG_CARGO_PUBLISH_TEMPORARILY_DISABLED__ (keep in sync)
# publish = true

name = "metaslang_bindings"
description = "Computes semantic language bindings from parsed source code"
Expand Down
5 changes: 1 addition & 4 deletions crates/metaslang/bindings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@

<!-- _PRODUCT_README_ (keep in sync) -->

[![release](https://img.shields.io/github/v/tag/NomicFoundation/slang?label=GitHub%20Release&logo=github&sort=semver&logoColor=white)](https://github.com/NomicFoundation/slang/releases)
[![crate](https://img.shields.io/crates/v/metaslang_bindings?label=Rust%20Crate&logo=rust&logoColor=white)](https://crates.io/crates/metaslang_bindings)

## Solidity compiler tooling by [@NomicFoundation](https://github.com/NomicFoundation)

A modular set of compiler APIs empowering the next generation of Solidity code analysis and developer tooling.
Written in Rust and distributed in multiple languages.

- [Announcement Post](https://medium.com/nomic-foundation-blog/slang-rethnet-2ad465fd7880)
- [How to write your own Solidity linter using Slang, in 25 lines of code!](https://blog.nomic.foundation/how-to-write-your-own-solidity-linter-using-slang-356e7565ad1b/)
- [User Guide](https://nomicfoundation.github.io/slang/latest/user-guide/rust-crate/)
- [Slang User Guide](https://nomicfoundation.github.io/slang/latest/user-guide/)

> ❗ This project is still in alpha, and is under active development.
> If you are planning on using it, please [reach out to us on Telegram](https://t.me/+pxApdT-Ssn5hMTFh) so we can help you get started.
Expand Down
3 changes: 2 additions & 1 deletion crates/metaslang/cst/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
version.workspace = true
rust-version.workspace = true
edition.workspace = true
publish = true
# __SLANG_CARGO_PUBLISH_TEMPORARILY_DISABLED__ (keep in sync)
# publish = true

name = "metaslang_cst"
description = "A generic library for building, navigating and querying concrete syntax trees."
Expand Down
5 changes: 1 addition & 4 deletions crates/metaslang/cst/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@

<!-- _PRODUCT_README_ (keep in sync) -->

[![release](https://img.shields.io/github/v/tag/NomicFoundation/slang?label=GitHub%20Release&logo=github&sort=semver&logoColor=white)](https://github.com/NomicFoundation/slang/releases)
[![crate](https://img.shields.io/crates/v/metaslang_cst?label=Rust%20Crate&logo=rust&logoColor=white)](https://crates.io/crates/metaslang_cst)

## Solidity compiler tooling by [@NomicFoundation](https://github.com/NomicFoundation)

A modular set of compiler APIs empowering the next generation of Solidity code analysis and developer tooling.
Written in Rust and distributed in multiple languages.

- [Announcement Post](https://medium.com/nomic-foundation-blog/slang-rethnet-2ad465fd7880)
- [How to write your own Solidity linter using Slang, in 25 lines of code!](https://blog.nomic.foundation/how-to-write-your-own-solidity-linter-using-slang-356e7565ad1b/)
- [User Guide](https://nomicfoundation.github.io/slang/latest/user-guide/rust-crate/)
- [Slang User Guide](https://nomicfoundation.github.io/slang/latest/user-guide/)

> ❗ This project is still in alpha, and is under active development.
> If you are planning on using it, please [reach out to us on Telegram](https://t.me/+pxApdT-Ssn5hMTFh) so we can help you get started.
Expand Down
3 changes: 2 additions & 1 deletion crates/metaslang/graph_builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
version.workspace = true
rust-version.workspace = true
edition.workspace = true
publish = true
# __SLANG_CARGO_PUBLISH_TEMPORARILY_DISABLED__ (keep in sync)
# publish = true

name = "metaslang_graph_builder"
description = "Construct graphs from parsed source code"
Expand Down
5 changes: 1 addition & 4 deletions crates/metaslang/graph_builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@

<!-- _PRODUCT_README_ (keep in sync) -->

[![release](https://img.shields.io/github/v/tag/NomicFoundation/slang?label=GitHub%20Release&logo=github&sort=semver&logoColor=white)](https://github.com/NomicFoundation/slang/releases)
[![crate](https://img.shields.io/crates/v/metaslang_graph_builder?label=Rust%20Crate&logo=rust&logoColor=white)](https://crates.io/crates/metaslang_graph_builder)

## Solidity compiler tooling by [@NomicFoundation](https://github.com/NomicFoundation)

A modular set of compiler APIs empowering the next generation of Solidity code analysis and developer tooling.
Written in Rust and distributed in multiple languages.

- [Announcement Post](https://medium.com/nomic-foundation-blog/slang-rethnet-2ad465fd7880)
- [How to write your own Solidity linter using Slang, in 25 lines of code!](https://blog.nomic.foundation/how-to-write-your-own-solidity-linter-using-slang-356e7565ad1b/)
- [User Guide](https://nomicfoundation.github.io/slang/latest/user-guide/rust-crate/)
- [Slang User Guide](https://nomicfoundation.github.io/slang/latest/user-guide/)

> ❗ This project is still in alpha, and is under active development.
> If you are planning on using it, please [reach out to us on Telegram](https://t.me/+pxApdT-Ssn5hMTFh) so we can help you get started.
Expand Down
3 changes: 2 additions & 1 deletion crates/solidity/outputs/cargo/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
version.workspace = true
rust-version.workspace = true
edition.workspace = true
publish = true
# __SLANG_CARGO_PUBLISH_TEMPORARILY_DISABLED__ (keep in sync)
# publish = true

name = "slang_solidity_cli"
description = "This crate contains the 'slang_solidity' CLI/cargo binary. Please see the 'slang_solidity' crate for more information."
Expand Down
5 changes: 1 addition & 4 deletions crates/solidity/outputs/cargo/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@

<!-- _PRODUCT_README_ (keep in sync) -->

[![release](https://img.shields.io/github/v/tag/NomicFoundation/slang?label=GitHub%20Release&logo=github&sort=semver&logoColor=white)](https://github.com/NomicFoundation/slang/releases)
[![crate](https://img.shields.io/crates/v/slang_solidity_cli?label=Rust%20Crate&logo=rust&logoColor=white)](https://crates.io/crates/slang_solidity_cli)

## Solidity compiler tooling by [@NomicFoundation](https://github.com/NomicFoundation)

A modular set of compiler APIs empowering the next generation of Solidity code analysis and developer tooling.
Written in Rust and distributed in multiple languages.

- [Announcement Post](https://medium.com/nomic-foundation-blog/slang-rethnet-2ad465fd7880)
- [How to write your own Solidity linter using Slang, in 25 lines of code!](https://blog.nomic.foundation/how-to-write-your-own-solidity-linter-using-slang-356e7565ad1b/)
- [User Guide](https://nomicfoundation.github.io/slang/latest/user-guide/rust-crate/)
- [Slang User Guide](https://nomicfoundation.github.io/slang/latest/user-guide/)

> ❗ This project is still in alpha, and is under active development.
> If you are planning on using it, please [reach out to us on Telegram](https://t.me/+pxApdT-Ssn5hMTFh) so we can help you get started.
Expand Down
3 changes: 2 additions & 1 deletion crates/solidity/outputs/cargo/crate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
version.workspace = true
rust-version.workspace = true
edition.workspace = true
publish = true
# __SLANG_CARGO_PUBLISH_TEMPORARILY_DISABLED__ (keep in sync)
# publish = true

name = "slang_solidity"
description = "A modular set of compiler APIs empowering the next generation of Solidity code analysis and developer tooling. Written in Rust and distributed in multiple languages."
Expand Down
7 changes: 1 addition & 6 deletions crates/solidity/outputs/cargo/crate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,14 @@

<!-- _PRODUCT_README_ (keep in sync) -->

[![release](https://img.shields.io/github/v/tag/NomicFoundation/slang?label=GitHub%20Release&logo=github&sort=semver&logoColor=white)](https://github.com/NomicFoundation/slang/releases)
[![crate](https://img.shields.io/crates/v/slang_solidity?label=Rust%20Crate&logo=rust&logoColor=white)](https://crates.io/crates/slang_solidity)
[![npm](https://img.shields.io/npm/v/@nomicfoundation/slang?label=NPM%20Package&logo=npm&logoColor=white)](https://www.npmjs.com/package/@nomicfoundation/slang)
[![documentation](https://img.shields.io/github/deployments/NomicFoundation/slang/github-pages?label=Documentation&logo=gitbook&logoColor=white)](https://nomicfoundation.github.io/slang)

## Solidity compiler tooling by [@NomicFoundation](https://github.com/NomicFoundation)

A modular set of compiler APIs empowering the next generation of Solidity code analysis and developer tooling.
Written in Rust and distributed in multiple languages.

- [Announcement Post](https://medium.com/nomic-foundation-blog/slang-rethnet-2ad465fd7880)
- [How to write your own Solidity linter using Slang, in 25 lines of code!](https://blog.nomic.foundation/how-to-write-your-own-solidity-linter-using-slang-356e7565ad1b/)
- [User Guide](https://nomicfoundation.github.io/slang/latest/user-guide/rust-crate/)
- [Slang User Guide](https://nomicfoundation.github.io/slang/latest/user-guide/)

> ❗ This project is still in alpha, and is under active development.
> If you are planning on using it, please [reach out to us on Telegram](https://t.me/+pxApdT-Ssn5hMTFh) so we can help you get started.
Expand Down
7 changes: 1 addition & 6 deletions crates/solidity/outputs/npm/package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,14 @@

<!-- _PRODUCT_README_ (keep in sync) -->

[![release](https://img.shields.io/github/v/tag/NomicFoundation/slang?label=GitHub%20Release&logo=github&sort=semver&logoColor=white)](https://github.com/NomicFoundation/slang/releases)
[![crate](https://img.shields.io/crates/v/slang_solidity?label=Rust%20Crate&logo=rust&logoColor=white)](https://crates.io/crates/slang_solidity)
[![npm](https://img.shields.io/npm/v/@nomicfoundation/slang?label=NPM%20Package&logo=npm&logoColor=white)](https://www.npmjs.com/package/@nomicfoundation/slang)
[![documentation](https://img.shields.io/github/deployments/NomicFoundation/slang/github-pages?label=Documentation&logo=gitbook&logoColor=white)](https://nomicfoundation.github.io/slang)

## Solidity compiler tooling by [@NomicFoundation](https://github.com/NomicFoundation)

A modular set of compiler APIs empowering the next generation of Solidity code analysis and developer tooling.
Written in Rust and distributed in multiple languages.

- [Announcement Post](https://medium.com/nomic-foundation-blog/slang-rethnet-2ad465fd7880)
- [How to write your own Solidity linter using Slang, in 25 lines of code!](https://blog.nomic.foundation/how-to-write-your-own-solidity-linter-using-slang-356e7565ad1b/)
- [User Guide](https://nomicfoundation.github.io/slang/latest/user-guide/npm-package/)
- [Slang User Guide](https://nomicfoundation.github.io/slang/latest/user-guide/)

> ❗ This project is still in alpha, and is under active development.
> If you are planning on using it, please [reach out to us on Telegram](https://t.me/+pxApdT-Ssn5hMTFh) so we can help you get started.
Expand Down
1 change: 0 additions & 1 deletion documentation/public/user-guide/.navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
- [Introduction](./introduction.md)
- [Concepts](./concepts.md)
- [Tree Query Language](./tree-query-language.md)
- [Rust Crate](./rust-crate/)
- [NPM Package](./npm-package/)
2 changes: 1 addition & 1 deletion documentation/public/user-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

- [Introduction](./introduction.md)
- [Concepts](./concepts.md)
- [Rust Crate](./rust-crate/index.md)
- [Tree Query Language](./tree-query-language.md)
- [NPM Package](./npm-package/index.md)
2 changes: 1 addition & 1 deletion documentation/public/user-guide/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ This is why, instead of having to download separate versions of the tool for eac

## Distributions

Slang itself is written in Rust and we maintain a public Rust package on [crates.io](https://crates.io/crates/slang_solidity). At the moment, we also distribute it as an [npm package](https://www.npmjs.com/package/@nomicfoundation/slang) with TypeScript interface. In the future, we plan on expanding the language captures with Python and possibly more.
Slang itself is written in Rust, compiled as a WASM component, and distributed as an [npm package](https://www.npmjs.com/package/@nomicfoundation/slang) with a TypeScript interface. In the future, we are also looking into publishing it as a Rust crate, a Python library, and possibly more.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

It's often more convenient to use the declarative `Query` API to traverse the CST, as they allow you to express your intent more concisely and can largely replace the need for both internal (cursor), and external (visitor) iterator patterns.

The [query language](./../tree-query-language.md) is based on pattern matching, and the execution semantics are closer to unification than to regular expression matching. A query returns all possible matches, not just the longest/shortest/first/last match.
The [Tree Query Language](./../tree-query-language.md) is based on pattern matching, and the execution semantics are closer to unification than to regular expression matching. A query returns all possible matches, not just the longest/shortest/first/last match.

If not specified otherwise, let's assume we already parsed a Solidity source and have a `cursor` pointing to the root node of the CST (created with `createTreeCursor`, see [Using the Cursor](./using-the-cursor.md)).

Expand Down
6 changes: 0 additions & 6 deletions documentation/public/user-guide/rust-crate/.navigation.md

This file was deleted.

7 changes: 0 additions & 7 deletions documentation/public/user-guide/rust-crate/index.md

This file was deleted.

16 changes: 0 additions & 16 deletions documentation/public/user-guide/rust-crate/installation.md

This file was deleted.

Loading

0 comments on commit 218acdb

Please sign in to comment.