1. 13 Aug, 2020 10 commits
    • Maxim Koltsov's avatar
      Merge branch 'maksbotan/#252-dap-executable' into 'master' · 277d1d15
      Maxim Koltsov authored
      [#252] Simple DAP executable
      
      Closes #252
      
      See merge request !465
      277d1d15
    • Maxim Koltsov's avatar
      [#252] Add morley-debugger-vscode extension · d2dd975b
      Maxim Koltsov authored
      Problem: morley-debug-adapter needs to be able to be tested with a real
      DAP client.
      
      Solution: add VSCode extension that launches morley-debug-adapter. The
      extension is copied from vscode-mock-debug repo: a starting point for
      DAP extension development.
      d2dd975b
    • Maxim Koltsov's avatar
      [#252] Add dap executable · 0bf02e10
      Maxim Koltsov authored
      Problem: we decided to use Debugger Adapter Protocol for morley-debugger
      UI, therefore we need its proof-of-concept implementation.
      
      Solution: add morley-debug-adapter executable that parses DAP messages
      on stdin and logs their Haskell representation to a log file.
      0bf02e10
    • Diogo Castro's avatar
      Merge branch 'diogo/#53-add-errors-to-nettest' into 'master' · 2ed87b7d
      Diogo Castro authored
      [#53] [#284] [#260] Handle morley-client and lorentz errors in Morley.Nettest
      
      See merge request !508
      2ed87b7d
    • Diogo Castro's avatar
      [#53] Add tests for `expectFailure` · 048c4d18
      Diogo Castro authored
      048c4d18
    • Diogo Castro's avatar
      [#53] Handle Lorentz errors / numeric errors · 5b71450d
      Diogo Castro authored
      Problem: we want to merge the Integrational and Nettest eDSLs, but the
      Nettest eDSL is lacking features such as letting the user expect a
      lorentz error like `VoidResult r` or `CustomError` + numeric errors.
      
      Solution: add support for lorentz errors + numeric errors.
      5b71450d
    • Diogo Castro's avatar
      [#53] Handle FailedWith/ShiftOverflow/EmptyTransaction/BadParam in Nettest · f292d7eb
      Diogo Castro authored
      Problem: Morley.Nettest does not let users say they expect a
      FailedWith/ShiftOverflow/EmptyTransaction/BadParam error.
      
      Solution: Add support for these errors in Morley.Nettest.
      f292d7eb
    • Diogo Castro's avatar
      [#53] [#284] Handle more "bad parameter" errors in morley-client · 077b7cd5
      Diogo Castro authored
      Problem: At the moment, morley-client raises a `BadParameter` exception
      only when a contract's parameter is well-typed, but the value itself is
      invalid. E.g., when a contract expects an `Address` as an input, but
      `0x0001` is passed instead.
      
      Solution: Change morley-client's exception handler to handle other
      scenarios, like passing a string or an int where an address is expected.
      077b7cd5
    • Diogo Castro's avatar
      [#53] Don't throw `NettestFailure` · 99a1682e
      Diogo Castro authored
      Problem:
      `NettestFailure` is currently used for two things:
      1. Users create an instance of `NettestFailure` and pass it to
         `expectFailure`.
      2. When morley-client throws a `ClientRpcError`, Morley.Nettest.Client
         catches it and maps it to a `NettestFailure`.
      
      These two use cases are not always reconcilable though. For example, if
      we want the `NettestFailedWith` to contain a michelson value, then it
      would have to contain a `T.Value t` to meet the expectations of use case
      (1) or an `Expression` to meet the expectations of use case (2).
      
      Solution:
      One way to reconcile these two use cases would be to convert
      `T.Value t` to `Expression` or vice-versa. An `Expression` cannot be
      converted to a `T.Value t` at the moment `ClientRpcError` is caught,
      because we don't yet know what the user expects `t` to be. A `T.Value t`
      could potentially be converted to an `Expression`, but then they'd show
      up in nettest's error messages, and they're very verbose and lack type
      info.
      
      The better solution is to use `NettestFailure` *only* for use case (1).
      When morley-client throws a `ClientRpcError`, we don't catch it and map
      it to a `NettestFailure` anymore. Instead, we do what
      `Morley.Nettest.Pure` does: we refactor `expectFailure` to compare the
      given `NettestFailure` against the caught `ClientRpcError`.
      99a1682e
    • Diogo Castro's avatar
      [#53] [#260] Refactor `expectMichelsonFailed` to not use a boolean predicate · fc3c9691
      Diogo Castro authored
      Problem: We should avoid using boolean predicates in expect* functions,
      because they lead to uninformative and opaque error messages (e.g.
      "predicate failed").
      
      Solution: Refactor `expectMichelsonFailed` to return `MichelsonFailed`,
      and let the caller choose whether to apply a predicate or not, and what
      error to return. Other functions will need to be addressed in a separate
      MR.
      fc3c9691
  2. 12 Aug, 2020 14 commits
  3. 11 Aug, 2020 8 commits
    • Ivan Gromakovskii's avatar
      Merge branch 'gromak/#305-default-entrypoint' into 'master' · b80eae14
      Ivan Gromakovskii authored
      [#305] Fix handling of the default entrypoint in SELF
      
      Closes #305
      
      See merge request !537
      b80eae14
    • Ivan Gromakovskii's avatar
      [#305] Update changelog · 9b46b497
      Ivan Gromakovskii authored
      9b46b497
    • Ivan Gromakovskii's avatar
      [#305] Add specific tests for instructions with `%default` · 586b7b8b
      Ivan Gromakovskii authored
      Problem: `%default` annotation is tricky to handle.
      We have some tests which involved `i %default` for some instructions
      `i`, but they are not focused specifically on `i %default`.
      I think it's a good idea to have smaller unit tests for that.
      
      Solution: add such tests to `morley-test`.
      586b7b8b
    • Ivan Gromakovskii's avatar
      [#305] Remove `instance Default EpName` · 5bcd1e5b
      Ivan Gromakovskii authored
      Problem: there are multiple ways to construct `EpName` referring to
      the default entrypoint: `DefEpName` pattern and `def` from `Default`.
      And when it comes to checking whether an `EpName` refers to the
      default entrypoint, there is also `isDefEpName` which should be
      preferred. Since semantics of referring to the default entrypoint
      is complicated (e. g. `%default is permitted only in `SELF`),
      we would like to minimize number of ways to do it.
      
      Solution: delete this `Default` instance, use `DefEpName` or
      `isDefEpName` instead.
      5bcd1e5b
    • Ivan Gromakovskii's avatar
      [#305] Shorten the `ep` definition · bf6e92fd
      Ivan Gromakovskii authored
      Problem: `ep` is defined as something long, but there is
      `unsafeBuildEpName` which does the same thing (converts `Text`
      to `EpName` assuming it is valid). So we can simplify that definition.
      
      Solution: define `ep = unsafeBuildEpName`.
      bf6e92fd
    • Ivan Gromakovskii's avatar
      [#305] Permit `SELF %default` · c715add6
      Ivan Gromakovskii authored
      Problem: it turned out that `SELF %default` instruction is permitted
      in Michelson. It's semantically equivalent to the `SELF` instruction
      (with no entrypoint reference), but is not entirely equivalent in
      binary format (that forms the blockchain). Specifically,
      `SELF %default` is more expensive to typecheck and consumes more
      storage size. Hence, we should distinguish them.
      
      Solution:
      1. Update `EpName` invariants and permit `"default"` there.
      2. Define `isDefEpName` as a better way to check whether `EpName`
      refers to the default entrypoint. Document the `DefEpName` pattern.
      3. Define `epNameFromSelfAnn` to construct `EpName` from `SELF`
      annotation. Use it in `SELF` typechecking.
      c715add6
    • Ivan Gromakovskii's avatar
      Merge branch 'zhenya/ops1023-update-haskell-nix' into 'master' · 77f4826b
      Ivan Gromakovskii authored
      [OPS-1023] CI: update dependencies
      
      See merge request !546
      77f4826b
    • Zhenya Vinogradov's avatar
      CI: update dependencies · 19f4e2f5
      Zhenya Vinogradov authored
      19f4e2f5
  4. 10 Aug, 2020 8 commits
    • Ivan Gromakovskii's avatar
      Merge branch 'gromak/tm430-morley-ledgers-go-away' into 'master' · 6f9dada8
      Ivan Gromakovskii authored
      Remove morley-ledgers
      
      See merge request !531
      6f9dada8
    • Ivan Gromakovskii's avatar
      Fix `instance Buildable ContractState` · 12bd5ab8
      Ivan Gromakovskii authored
      Problem: in this instance "Storage" and "Contract" are confused, also
      `cs` prefix looks useless for human-readable pretty rendering.
      Solution: swap Storage and Contract, remove the prefix.
      12bd5ab8
    • Ivan Gromakovskii's avatar
      Remove morley-ledgers · e498c7de
      Ivan Gromakovskii authored
      Problem: morley-ledgers packages have been moved to
      https://gitlab.com/morley-framework/morley-ledgers/ to achieve better
      modularity.  Hence we should remove them from this repo.
      Solution: remove all traces of those packages.
      e498c7de
    • Ivan Gromakovskii's avatar
      Remove gen-autodoc.sh · 1128cc5a
      Ivan Gromakovskii authored
      Problem:
      1. This script is likely broken because it assumes that `document`
      command without `-o` will use stdout, but it outputs to a file.
      2. This script doesn't account for other ContractRegistry
      executables such as multisig.
      3. We are moving `morley-ledgers` to another repo and don't want to
      copy-paste this script.
      4. It is not used anywhere automatically and probably most people are
      not aware of it (otherwise someone would have fixed it).
      5. It always uses `stack`, but some people use `cabal`.
      6. Overall, I think it's not really useful because the most important
      thing it does is conversion from markdown to html, but one can use
      `pandoc` for this purpose like this:
      > `pandoc -s -o out.html -f gfm AbstractLedger.md`
      
      Solution: perhaps it's better to just remove this script, that's what
      we do here.
      1128cc5a
    • Moremi Vannak's avatar
      Merge branch 'rinn7e/#104-sample-val-autodoc' into 'master' · ffa140b8
      Moremi Vannak authored
      [#104] Show sample values in autodoc
      
      Closes #104
      
      See merge request !528
      ffa140b8
    • Moremi Vannak's avatar
      [#104] Show sample values in autodoc · b9c8f7af
      Moremi Vannak authored
      Problem: Documentation produced by our autodoc engine shows argument
      type of each entrypoint which is good, but people who use vanilla Michelson
      may have difficulties constructing a value of that type. In order to make
      their life a bit easier we can provide some sample value of that type.
      
      Solution: Generate sample values from entrypoint type. Add a way to
      modify those same values value with desire values.
      b9c8f7af
    • Roman Melnikov's avatar
      Merge branch 'rvem/remove-local-chain' into 'master' · 4c309caa
      Roman Melnikov authored
      Remove local-chain directory
      
      See merge request !541
      4c309caa
    • Roman Melnikov's avatar
      Update README · 676352e0
      Roman Melnikov authored
      676352e0