daml/compiler/daml-extension
Andreas Herrmann 33e47828e3
Bazel 1.1 (#3249)
* bazel: 0.28.1 --> 1.1.0

* bazel-watcher sha256

* Fix missing line in patch

* proto_source_root --> strip_import_prefix

See https://github.com/bazelbuild/bazel/issues/7153 for details.

* Update rules_nixpkgs

Required to avoid errors of the form
```
ERROR: An error occurred during the fetch of repository 'node_nix':
   parameter 'sep' may not be specified by name, for call to method split(sep, maxsplit = None) of 'string'
```

and
```
ERROR: An error occurred during the fetch of repository 'node_nix':
   Traceback (most recent call last):
	File "/private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 149
		_execute_or_fail(repository_ctx, <3 more arguments>)
	File "/private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 318, in _execute_or_fail
		fail(<1 more arguments>)

Cannot build Nix attribute 'nodejs'.
Command: [/Users/runner/.nix-profile/bin/nix-build, /private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/node_nix/nix/bazel.nix, "-A", "nodejs", "--out-link", "bazel-support/nix-out-link", "-I", "nixpkgs=/private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/nixpkgs/nixpkgs"]
Return code: 1
Error output:
src/main/tools/process-tools.cc:173: "setitimer": Invalid argument
```

* Update rules_scala

* .proto has been removed, use [ProtoInfo] instead

See
https://docs.bazel.build/versions/1.1.0/be/protocol-buffer.html#proto_library

* python3_nix add nix_file attribute

To avoid the following error

```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/BUILD:66:1: //:nix_python3_runtime depends on @python3_nix//:bin/python in repository @python3_nix which failed to fetch. no such package '@python3_nix//': Traceback (most recent call last):
        File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 149
                _execute_or_fail(repository_ctx, <3 more arguments>)
        File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 318, in _execute_or_fail
                fail(<1 more arguments>)

Cannot build Nix attribute 'python3'.
Command: [/home/aj/.nix-profile/bin/nix-build, "-E", "import <nixpkgs> { config = {}; overlays = []; }", "-A", "python3", "--out-link", "bazel-support/nix-out-link", "-I", "nixpkgs=/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/nixpkgs/nixpkgs"]
Return code: 1
Error output:
error: anonymous function at /home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/nixpkgs/nixpkgs.nix:3:1 called with unexpected argument 'config', at (string):1:1
```

* rules_haskell unnamed string.split(_, maxsplit = _)

The keyword argument may no longer be named.

* string.replace(_, _, maxsplit = _) may not be named

* Move proto sources from deps to data

Fixes

```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/daml-lf/archive/BUILD.bazel:150:1: in deps attribute of scala_test rule //daml-lf/archive:daml_lf_archive_reader_tests_test_suite_src_test_scala_com_digitalasset_daml_lf_archive_DecodeV1Spec.scala: '//daml-lf/archive:daml_lf_1.6_archive_proto_srcs' does not have mandatory providers: 'JavaInfo'. Since this rule was created by the macro 'da_scala_test_suite', the error might have been caused by the macro implementation
```

* Define sha256 for haskell_ghc__paths

Bazel 1.1.0 fails on missing hashes.

* Disable --incompatible_windows_native_test_wrapper

* //compiler/daml-extension don't modify sources

Modifying sources in-place can cause issues on Windows, where build
actions are not sandboxed and changes on sources can affect other build
steps.

* bazel-genfiles --> bazel-bin

The bazel-genfiles symlink has been removed since Bazel 1.0.
See https://github.com/bazelbuild/bazel/issues/8651

* Mark dev_env_tool repository rule as configure

See
https://docs.bazel.build/versions/1.1.0/skylark/lib/globals.html#repository_rule

* Move data deps into data attribute

* Mark dev_env_tool as local = True

* Manually fetch @makensis_dev_env
2019-11-11 10:06:03 +01:00
..
images Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
snippets Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
src Check versions for types and nonemptiness before displaying release notes (#3368) 2019-11-07 16:59:40 -05:00
syntaxes Stop highlighting signature as a keyword in the IDE (#2599) 2019-08-20 07:23:39 +00:00
test update copyright notices (#2499) 2019-08-13 17:23:03 +01:00
.gitignore Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
.vscodeignore Fix VSCode extension (#2117) 2019-07-12 11:09:37 +02:00
BUILD.bazel Bazel 1.1 (#3249) 2019-11-11 10:06:03 +01:00
ci-tests.sh update copyright notices (#2499) 2019-08-13 17:23:03 +01:00
daml12.configuration.json Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
daml.configuration.json Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
exclude-list.txt Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
extension_guide.md Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
Makefile Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
package.json Display release notes using webview (#3321) 2019-11-06 17:01:35 -05:00
README.md Visual ide (#2467) 2019-08-12 12:42:45 -04:00
tsconfig.json Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
vsc-extension-quickstart.md Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
yarn.lock Display release notes using webview (#3321) 2019-11-06 17:01:35 -05:00

DAML Studio

DAML Studio extends Visual Studio Code with the following DAML-specific features:

  • DAML syntax highlighting
  • Real-time feedback on parse, name resolution, type-checking and Scenario interpretation errors and viewer for the resulting ledger
  • Jumping to and peeking at the definition of referenced toplevel functions
  • Type-information on hover
  • Renaming of symbols
  • DAML snippet support
  • Command to generate visualization for DAML project via command palette ctrl + p.

Please note that this will only install the VSCode extension. Full use of the above features will also require that you have a working DAML SDK installed, which you can get with:

curl -s https://get.daml.com | sh

To see graphs from daml.visualize command please install Graphivz plugin.

For more information on DAML please see docs.daml.com.

Troubleshooting

The DAML language server log output is available under the "Output" panel (View->Output). Select "DAML Language Server" from the dropdown in the panel to see the log.

Debugging

Run make then open this directory in Visual Studio Code. Then click Debug -> Start Debugging to run the extension in Debugging mode.