Commit Graph

16 Commits

Author SHA1 Message Date
Gary Verhaegen
151e12b81a
bump copyright (#16002)
This is the result of:

- Updating `./COPY` to say `2023`.
- Running `./dev-env/bin/dade-copyright-headers update .`
2023-01-04 18:21:15 +01:00
Andreas Herrmann
891640fbc4
Update rules_sh and use new sh_binaries (#14303)
* Update rules_sh

CHANGELOG_BEGIN
CHANGELOG_END

* Update to sh_binaries provided by rules_sh

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2022-06-30 16:14:33 +02:00
Andreas Herrmann
18a9c93549
Bazelify ghc-lib (#12508)
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Co-authored-by: Claudio Bley <claudio.bley@digitalasset.com>
2022-05-19 10:49:16 +02:00
Gary Verhaegen
d2e2c21684
update copyright headers (#12240)
New year, new copyright, new expected unknown issues with various files
that won't be covered by the script and/or will be but shouldn't change.

I'll do the details on Jan 1, but would appreciate this being
preapproved so I can actually get it merged by then.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-03 16:36:51 +00:00
Gary Verhaegen
a925f0174c
update copyright notices for 2021 (#8257)
* update copyright notices for 2021

To be merged on 2021-01-01.

CHANGELOG_BEGIN
CHANGELOG_END

* patch-bazel-windows & da-ghc-lib
2021-01-01 19:49:51 +01:00
Moritz Kiefer
0fe4769b6b
Reduce the number of runfiles in the compatibility tests (#6670)
Details are in a comment.

changelog_begin
changelog_end
2020-07-09 17:15:16 +00:00
Samir Talwar
28873913d9
Bazel: Upgrade Buildifier. (#6625)
Buildifier now comes with a handy attachment to catch single `\`
characters inside strings and replace them with `\\` if the escape
sequence is invalid. Skylark/Python will do this at runtime anyway; this
just makes it clearer what the actual behavior is.

I needed to change `\` characters at the end of lines to `\\` manually
in order to stop Buildifier from simply concatenating the lines
together. Everything else was automatic.

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-06 16:07:47 +00:00
Andreas Herrmann
1b711d0ac6
Hermetic nixpkgs_cc_toolchain (#5976)
* update rules_nixpkgs

* Use hermetic nixpkgs cc toolchain

CHANGELOG_BEGIN
CHANGELOG_END

* Work around Bazel's cc toolchain autodetection

* Use --crosstool_top for hermetic cc toolchain

When using --incompatible_enable_cc_toolchain_resolution instead
cc actions still depend on
`external/local_config_cc/builtin_include_directory_paths`
as well as
`external/nixpkgs_cc_toolchain_config/builtin_include_directory_paths`.

* override local_config_cc

* remove unused attribute

* Fix posix toolchain on Windows

* nixpkgs cc toolchain not on Windows

* Fix nixpkgs cc toolchain on MacOS

* nixpkgs cc toolchain uses bin/cc

* Use darwin.binutils on MacOS

* Remove clang(++) and gcc (g++) symlinks

The toolchain only considers `bin/cc` and having the other symlinks
around could lead to confusion

* Use hermetic toolchain in compatibility workspace

* Avoid empty linker flags

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-05-18 18:03:51 +02:00
Samir Talwar
57a8d0b37e
CI: Run PostgreSQL once for all Scala tests. (#5919) 2020-05-14 09:06:34 +02:00
Gary Verhaegen
1872c668a5
replace DAML Authors with DA in copyright headers (#5228)
Change requested by Manoj.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-27 01:26:10 +01:00
Gary Verhaegen
878429e3bf
update copyright notices to 2020 (#3939)
copyright update 2020

* update template
* run script: `dade-copyright-headers update .`
* update script
* manual adjustments
* exclude frozen proto files from further header checks (by adding NO_AUTO_COPYRIGHT files)
2020-01-02 21:21:13 +01:00
Andreas Herrmann
f1f41b6e3e Windows: Take stack from dadew (#3596)
rules_haskell looks for stack in PATH. On Windows it is provided by
dadew (i.e. scoop). rules_haskell then symlinks (copies on Windows) the
stack binary. Unfortunately, this breaks with scoop as the shim file is
then not found.
2019-11-22 17:27:42 +00:00
Andreas Herrmann
c994703c0c Update rules_haskell (#3473)
* Update rules_haskell & rules_nixpkgs

* Define dadew POSIX toolchain on Windows

* Build hpp with stack and Cabal

* Replace Hazel hpp by @stackage hpp

* replace backslash by forward slash

* Cabal wrapper exclude bindist includes

* ghci-grpc patch fix missing argument

* Switch to rules_haskell master
2019-11-15 10:50:12 +00:00
Moritz Kiefer
e6bc0213ac
Prefetch all dev-env tools (#3409)
* Prefetch all dev-env tools

maybe this helps with some of the CI flakiness that we have seen.

* no enable
2019-11-11 12:33:52 +01:00
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
Andreas Herrmann
6877d5279c
recursively symlink all files in dev_env_tool (#3377)
* dev_env_tool - recursively symlink all files

* dev_env_tool: add prefix attribute

* Replace nodejs by dev_env_tool

* postgresql.exe --> postgres.exe

* Remove unused dev_env_package

And rename dev_env_package --> dev_env_tool

* dev_env_tool macOS compatbility

BSD find does not support `-printf`.

* ReserServiceIT: 4 attempts on Windows
2019-11-08 09:40:26 +01:00