Skip to content
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

chore: adding fix to master branch #3279

Merged
merged 5 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/docs/build-status/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ while [[ "$DEPLOY_STATUS" != "ready" && $COUNT -lt $MAX_RETRIES ]]; do
exit 0
elif [[ "$DEPLOY_STATUS" == "error" ]]; then
echo "deploy_status=failure" >> $GITHUB_OUTPUT
exit 0
exit 1
fi

echo "Deploy still running. Retrying..."
done

echo "deploy_status=failure" >> $GITHUB_OUTPUT
exit 0
exit 1
6 changes: 6 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ jobs:
site-id: ${{ secrets.NETLIFY_SITE_ID }}
continue-on-error: true


- name: Debugging - print deploy_status
run: echo "${{ steps.check_deploy_status.outputs.deploy_status }}"


- name: Change PR Comment for Successful Deployment
if: steps.check_deploy_status.outputs.deploy_status == 'success'
uses: mshick/add-pr-comment@v2
Expand Down Expand Up @@ -134,3 +136,7 @@ jobs:
Deployment didn't succeed. Please check logs below and resolve the issue 🧐

[![Netlify Status](https://api.netlify.com/api/v1/badges/${{ secrets.NETLIFY_SITE_ID }}/deploy-status?branch=${{ github.head_ref || github.ref }})](https://app.netlify.com/sites/noir-docs-v2/deploys)

- name: Fail the workflow if deployment failed
if: steps.check_deploy_status.outputs.deploy_status == 'failure'
run: exit 1
4 changes: 3 additions & 1 deletion docs/docs/language_concepts/01_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,14 @@

Also note that impls with the same method name defined in them cannot overlap. For example, if we already have `foo` defined for `Foo<u32>` and `Foo<u64>` like we do above, we cannot also define `foo` in an `impl<T> Foo<T>` since it would be ambiguous which version of `foo` to choose.

```rs
```rust
// Including this impl in the same project as the above snippet would
// cause an overlapping impls error
impl<T> Foo<T> {
fn foo(self) -> Field { 3 }
}
```

## Lambdas

Lambdas are anonymous functions. They follow the syntax of Rust - `|arg1, arg2, ..., argN| return_expression`.
Expand Down Expand Up @@ -195,7 +197,7 @@
The field can be defined implicitly, by using the name of the elliptic curve usually associated to it - for instance bn254, bls12_381 - or explicitly by using the field (prime) order, in decimal or hexadecimal form.
As a result, it is possible to define multiple versions of a function with each version specialized for a different field attribute. This can be useful when a function requires different parameters depending on the underlying elliptic curve.

Example: we define the function `foo()` three times below. Once for the default Noir bn254 curve, once for the field $\mathbb F_{23}$, which will normally never be used by Noir, and once again for the bls12_381 curve.

Check warning on line 200 in docs/docs/language_concepts/01_functions.md

View workflow job for this annotation

GitHub Actions / Spellcheck / Spellcheck

Unknown word (mathbb)

```rust
#[field(bn254)]
Expand Down
Loading