Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • dan0196/ligo
  • ligolang/ligo
  • maht0rz/ligo
  • JD-P/ligo
  • governancy/ligo
  • renovatorruler/ligo
  • dailambda/ligo
  • jevonearth/ligo
  • mbykovskyy_ecadlabs/ligo
  • opt9/ligo
  • arvidnl/ligo
  • jpic/ligo
  • juztin/ligo
  • steakandbake/ligo
  • mark-o-robson/ligo
  • simon138/ligo
  • nmangan/ligo
  • edmondlee/ligo
  • technomad21c/ligo
  • diogo.machado/ligo
  • kkirka/ligo
  • nobrakal/ligo
  • roxane3/ligo
  • GImbrailo/ligo
  • syuhei176/ligo
  • mjgajda/ligo
  • sanityinc/ligo
  • molllyn1/ligo
  • ulrikstrid/ligo
  • prometheansacrifice/ligo
  • nicolas.van.phan/ligo
  • ryujh21h/ligo
  • rishabhkeshan/ligo
  • amitcz/ligo
  • jobjo/ligo
  • deryyy/ligo
  • my8bit/ligo
  • daachi/ligo
  • elmorg/ligo
  • a.kumar4/ligo
  • dheavy/ligo
  • konchunas/ligo
  • ggichuru.dev/ligo
  • steven_j/ligo
  • arguiot/ligo
  • digitea00/ligo
  • melwyn95/ligo
  • chrispinnock/ligo
  • clarus1/ligo
  • patrickferris/ligo
  • caaatisgood/ligo
  • karoshibee/ligo-kbee
  • arguil/ligo
  • benjamin.fuentes/ligo
  • Dayveed117/ligo
  • timothymcmackin/ligo
  • shubham-kumar/ligo
  • bfamchon1/ligo
  • mavryk-network/ligo
  • int-index/ligo
60 results
Show changes
Commits on Source (16)
Showing
with 191 additions and 21 deletions
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/debian/.devcontainer/base.Dockerfile
# [Choice] Debian version: bullseye, buster, stretch
ARG VARIANT="buster"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
ARG USERNAME="vscode"
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
opam make pkg-config cargo libhidapi-dev libev-dev libgmp-dev libffi-dev inotify-tools emacs-nox
RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \
&& mkdir /commandhistory \
&& touch /commandhistory/.bash_history \
&& chown -R $USERNAME /commandhistory \
&& echo $SNIPPET >> "/home/$USERNAME/.bashrc"
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/debian
{
"name": "Debian",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Debian version: bullseye, buster, stretch
"args": {
"VARIANT": "buster"
}
},
"settings": {
"files.autoSave": "afterDelay",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.tabSize": 2,
"git.autofetch": true,
"ocaml.sandbox": {
"kind": "opam",
"switch": "${containerWorkspaceFolder}"
},
"indentRainbow.ignoreErrorLanguages": [
"*"
],
"files.insertFinalNewline": true,
"terminal.integrated.commandsToSkipShell": [
"-workbench.action.toggleSidebarVisibility"
],
"files.watcherExclude": {
"**/_opam/**": true,
"**/_build/**": true,
"**/changelog/**": true,
"**/gitlab-pages/**": true,
}
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint",
"oderwat.indent-rainbow",
"ocamllabs.ocaml-platform",
"ligolang-publish.ligo-vscode",
"mhutchie.git-graph",
"github.vscode-pull-request-github",
"ms-vsliveshare.vsliveshare-pack",
"wayou.vscode-todo-highlight"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
"mounts": [
"source=projectname-bashhistory,target=/commandhistory,type=volume"
],
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
"postCreateCommand": "./.devcontainer/setup_dev_env.sh",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
opam init --disable-sandboxing --bare -y
echo "Setting up dev switch"
opam update
./scripts/setup_dev_switch.sh
export PATH=~/.cargo/bin:$PATH
opam install -y --with-test --locked=locked $(find vendors -name \*.opam) ./ligo.opam
setup_opam="eval \`opam config env\` "
echo $setup_opam >> ~/.bashrc
echo $setup_opam >> ~/.zshrc
......@@ -33,7 +33,6 @@ COPY vendors/ligo-utils/proto-alpha-utils/proto-alpha-utils.opam /ligo/vendors/l
COPY vendors/ligo-utils/tezos-utils/tezos-utils.opam /ligo/vendors/ligo-utils/tezos-utils/tezos-utils.opam
COPY vendors/ligo-utils/memory-proto-alpha/tezos-memory-proto-alpha.opam /ligo/vendors/ligo-utils/memory-proto-alpha/tezos-memory-proto-alpha.opam
COPY vendors/ligo-utils/simple-utils/simple-utils.opam /ligo/vendors/ligo-utils/simple-utils/simple-utils.opam
COPY vendors/ligo-utils/ligo_009_PsFLoren-test-helpers/ligo-009-PsFLoren-test-helpers.opam /ligo/vendors/ligo-utils/ligo_009_PsFLoren-test-helpers/ligo-009-PsFLoren-test-helpers.opam
RUN opam update && sh scripts/install_opam_deps.sh
# Now install vendor libs
......
author: er433
merge_request: '1290'
title: 'Tests: remove unused warnings'
type: internal
---
title: "JsLIGO: improve floating block scope handling"
merge_request: "1296"
author: "@SanderSpies"
type: "fixed"
author: Pierre-Emmanuel Wulfman
merge_request: '1300'
title: Add assert_with_error funciton family
type: changed
---
title: "Documentation of Preprocessor and LexerLib libraries."
merge_request: "1306"
author: "Christian Rinderknecht"
type: "added"
---
title: "JsLIGO: disallow variables with the same name in the same block to align with JS/TS"
merge_request: "1296"
author: "@SanderSpies"
type: "fixed"
author: er433
merge_request: '1308'
title: 'Testing framework: add steps bound (for timeout)'
type: added
author: Rémi Lesénéchal
title: 'testing framework: deprecates bootstrapped accounts support due to a problem
in one of our tezos dependency, this feature will be enabled again in further updates'
type: removed
merge_request: '1301'
author: Ulrik Strid
title: updating tezos dependencies to Granada (010-PtGRANAD)
type: changed
merge_request: '1301'
......@@ -334,7 +334,7 @@ let deny = ([action, store]: [parameter, storage]): return_ => {
</Syntax>
<Syntax syntax="jsligo">
```jsligo group=c
```jsligo group=d
type parameter = unit;
type storage = unit;
type return_ = [list<operation>, storage];
......@@ -572,7 +572,7 @@ type parameter =
// ...
```
```jsligo group=d
```jsligo group=e
// proxy.jsligo
type parameter =
......
......@@ -182,7 +182,7 @@ let twice = (x : int) : int => x * x;
</Syntax>
<Syntax syntax="jsligo">
```jsligo test-ligo group=frontpage
```jsligo test-ligo group=frontpage2
let twice = (x: int): int => x * x;
```
......@@ -589,7 +589,7 @@ let main = ((action, store) : (parameter, storage)) : return => {
</Syntax>
<Syntax syntax="jsligo">
```jsligo test-ligo group=frontpage
```jsligo test-ligo group=frontpage3
// This is mutation-contract.jsligo
type storage = int;
......@@ -679,7 +679,7 @@ let test = originate_and_test(main);
</Syntax>
<Syntax syntax="jsligo">
```jsligo test-ligo group=frontpage
```jsligo test-ligo group=frontpage3
// This continues mutation-contract.jsligo
let originate_and_test = (mainf : ((p: parameter, s: storage) => return_)) : unit => {
......
......@@ -581,10 +581,10 @@ let test =
( ([threshold , expected_size] : [tez , nat]) : unit => {
let tester = ([balances, threshold] : [balances, tez]) : nat => Map.size (balances_under (balances, threshold));
let size = Test.run(tester, [balances, threshold]);
let expected_size = Test.eval(expected_size) ;
let expected_size_ = Test.eval(expected_size) ;
let unit = Test.log (["expected", expected_size]) ;
let unit = Test.log (["actual",size]) ;
return (assert (Test.michelson_equal (size,expected_size)))
let unit_ = Test.log (["actual",size]) ;
return (assert (Test.michelson_equal (size,expected_size_)))
},
list ([ [15 as tez,2 as nat] , [130 as tez,1 as nat] , [1200 as tez,0 as nat]]) );
```
......
......@@ -1156,7 +1156,7 @@ Mutez (micro tez)
```jsligo
let tez: tez = 42 as tez
let tez: tez = 7 as mutez
let tez2: tez = 7 as mutez
```
</div>
......@@ -1228,7 +1228,7 @@ Types
</div>
<div className="example">
```jsligo
```jsligo group=b
type age = int
type name = string
```
......@@ -1258,7 +1258,7 @@ Functions (long form)
</div>
<div className="example">
```jsligo
```jsligo group=b
let add = (a: int, b: int): int => {
let c = a;
let d = b;
......@@ -1291,7 +1291,7 @@ Options
```jsligo
type middle_name = option<string>;
let middle_name : middle_name = Some("Foo");
let middle_name : middle_name = None();
let middle_name_ : middle_name = None();
```
</div>
......@@ -1358,7 +1358,7 @@ let john : person = {
name: "john doe"
}
let name: string = john.name
let name_: string = john.name
```
</div>
......@@ -1378,7 +1378,7 @@ let prices: prices = Map.literal(list([
let price: option<tez> = Map.find_opt(50 as nat, prices)
let prices: prices = Map.update(200 as nat, (Some (5 as mutez)), prices)
let prices2: prices = Map.update(200 as nat, (Some (5 as mutez)), prices)
```
</div>
......
......@@ -6,13 +6,13 @@ title: Installation
There are currently three ways to get started with LIGO. You can choose to use a Docker image, a static Linux binary or to install packages for your Debian Linux distribution.
## Dockerised installation (recommended)
If you've [installed 🐳 Docker](https://docs.docker.com/install/), you can run the latest [LIGO release 0.24.0](./changelog.md):
If you've [installed 🐳 Docker](https://docs.docker.com/install/), you can run the latest [LIGO release 0.25.0](./changelog.md):
Linux or OSX:
> `docker run --rm -v "$PWD":"$PWD" -w "$PWD" ligolang/ligo:0.24.0`
> `docker run --rm -v "$PWD":"$PWD" -w "$PWD" ligolang/ligo:0.25.0`
Windows:
> `docker run --rm -v "%CD%":/cd -w /cd ligolang/ligo:0.24.0`
> `docker run --rm -v "%CD%":/cd -w /cd ligolang/ligo:0.25.0`
Or if you want the development version, replace the version above with `next`.
......
......@@ -124,7 +124,7 @@ let some = (o : option (unit)) => {
</Syntax>
<Syntax syntax="jsligo">
```jsligo group=failwith
```jsligo group=failwith_alt
let main = (p: bool, s: unit): [list<operation>, unit] => {
let u: unit = assert(p);
return [list([]) as list<operation>, s];
......@@ -136,3 +136,46 @@ let some = (o: option<unit>): unit => {
```
</Syntax>
You can use `assert_with_error` or `assert_some_with_error` to use a custom error message
<Syntax syntax="pascaligo">
```pascaligo group=failwith
function main (const p : bool; const s : storage) : return is
block {
assert_with_error (p,"my custom message")
}
with ((nil : list (operation)), s)
```
</Syntax>
<Syntax syntax="cameligo">
```cameligo group=failwith
let main (p, s : bool * unit) =
let u : unit = assert_with_error p "my custom error message"
in ([] : operation list), s
```
</Syntax>
<Syntax syntax="reasonligo">
```reasonligo group=failwith
let main = (p : bool, s : unit) => {
let u : unit = assert_with_error (p, "my custom error message");
([]: list (operation), s);
};
```
</Syntax>
<Syntax syntax="jsligo">
```jsligo group=failwith
let main2 = (p: bool, s: unit): [list<operation>, unit] => {
let u: unit = assert_with_error (p, "my custom error message");
return [list([]) as list<operation>, s];
};
```
</Syntax>
\ No newline at end of file
......@@ -277,7 +277,7 @@ let k = ([x, _] : [int, int]) : int => x;
or use an identifier starting with wildcard:
```jsligo
let k = ([x, _y] : [int, int]) : int => x;
let k_other = ([x, _y] : [int, int]) : int => x;
```
</Syntax>
......
......@@ -1421,7 +1421,7 @@ In JsLIGO, the predefined function which removes a binding in a map
is called `Map.remove` and is used as follows:
```jsligo group=big_maps
let updated_map: register =
let updated_map_: register =
Map.remove("tz1gjaF81ZRRvdzjobyfVNsAeSC6PScjfQwN" as address, moves);
```
......