Commit Graph

562 Commits

Author SHA1 Message Date
Moritz Kiefer
e40f62f88a
Revert "Switch to Bazel 5 (#12935)" (#12974)
This reverts commit 4c0118df4d.

This breaks passing -p to bazel test for Haskell tests, e.g.,

bazel test //compiler/damlc/tests:integration-v1dev --test_arg -p
--test_arg InterfaceEq

which breaks with something horrifying like

moritz@adjunction ~/daml (main)> bazel test //compiler/damlc/tests:integration-v1dev --test_arg -p --test_arg InterfaceEq
[dev-env] Building tools.bazel...
[dev-env] Built tools.bazel in /nix/store/m7gzlmr0pqjpl01ihgvazxgfs3sfwl61-bazel and linked to /home/moritz/daml/dev-env/var/gc-roots/bazel
[dev-env] Building tools.find...
[dev-env] Built tools.find in /nix/store/645v3545lcbx77wq7355rgdrgbhn5wx7-findutils-4.8.0 and linked to /home/moritz/daml/dev-env/var/gc-roots/find
INFO: Invocation ID: 034b3e45-851f-472e-ab71-b7f718829582
DEBUG: /home/moritz/.cache/bazel/_bazel_moritz/bb4e4404f889dc1b816f246b08c0d9ea/external/rules_haskell/haskell/private/versions.bzl:60:10: WARNING: bazel version is too recent. Supported versions range from 4.0.0 to 4.2.1, but found: 5.0.0- (@non-git)
/nix/store/dadkhf8vch2i2kvig962ilfr5j3chshr-go-1.17.6
/nix/store/pzh24n543i6jqa01hdmgqknlyf294bn1-bazel-nixpkgs-posix-toolchain
/nix/store/2hfwndk47wpvaib06qyhcdp83b423xvh-jq-1.6-bin
/nix/store/hjggs9s82qh7r5j8sgapn389hf24wdx8-bazel-nixpkgs-cc-toolchain
/nix/store/yxgg3bn4v288sc00kf09svrwz2r461c9-ghc-native-bignum-9.0.2
/nix/store/2hwx0jhcdsx3wfvmb50ih19jkh2ra4jh-glibc-locales-2.33-108
/nix/store/8wpmx049z8m0ffhy3jyi41qb6pbxwvy8-bazel-nixpkgs-java-runtime
ERROR: file 'external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.pic.o' is generated by these conflicting actions:
Label: @bazel_tools//src/tools/launcher:launcher
RuleClass: cc_binary rule
Configuration: 869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9, 8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c
Mnemonic: CppCompile
Action key: 3d79fe1470dcb842d5944c98dfe7a62715db6d86fdb12d3ff60af3bdf41b7996
Progress message: Compiling src/tools/launcher/dummy.cc
PrimaryInput: File:[/home/moritz/.cache/bazel/_bazel_moritz/bb4e4404f889dc1b816f246b08c0d9ea/external/bazel_tools[source]]src/tools/launcher/dummy.cc
PrimaryOutput: File:[[<execution_root>]bazel-out/k8-opt/bin]external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.pic.o
Owner information: ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9]}, ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c]}
MandatoryInputs: are equal
Outputs: are equal
ERROR: file 'external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.o' is generated by these conflicting actions:
Label: @bazel_tools//src/tools/launcher:launcher
RuleClass: cc_binary rule
Configuration: 869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9, 8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c
Mnemonic: CppCompile
Action key: 9f46e824944add9e9951ef51ddb6cb4b744bc97f90b5749132179d1d1699dfa1
Progress message: Compiling src/tools/launcher/dummy.cc
PrimaryInput: File:[/home/moritz/.cache/bazel/_bazel_moritz/bb4e4404f889dc1b816f246b08c0d9ea/external/bazel_tools[source]]src/tools/launcher/dummy.cc
PrimaryOutput: File:[[<execution_root>]bazel-out/k8-opt/bin]external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.o
Owner information: ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9]}, ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c]}
MandatoryInputs: are equal
Outputs: are equal
ERROR: com.google.devtools.build.lib.skyframe.ArtifactConflictFinder$ConflictException: com.google.devtools.build.lib.actions.MutableActionGraph$ActionConflictException: for external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.o, previous action: action 'Compiling src/tools/launcher/dummy.cc', attempted action: action 'Compiling src/tools/launcher/dummy.cc'

changelog_begin
changelog_end
2022-02-16 18:24:00 +00:00
Moritz Kiefer
4c0118df4d
Switch to Bazel 5 (#12935)
* Switch to Bazel 5

changelog_begin
changelog_end

* .

* .

changelog_begin
changelog_end
2022-02-16 10:47:05 +00:00
Moritz Kiefer
67f214b1d1
Fix daml script reference in copy-unix-release-artifacts (#12933)
I also changed CI config so we run this on every build but only upload
on releases. That should hopefully make sure we catch this immediately
next time. The script is fast enough that this shouldn’t slow this
down meaningfully.

changelog_begin
changelog_end
2022-02-15 09:53:15 +01:00
Moisés Ackerman
4848519fc6
Enable go-to-definition for interface methods and choices (#12903)
* Extend interface go to def test to cover methods and choices

changelog_begin
changelog_end
2022-02-15 08:30:30 +00:00
Gary Verhaegen
c04fa81d6a
ci: bump Windows workdirs (#12918)
Since #12645, we added a new pipeline, so we need to add a corresponding
entry.

As for #12645, the content of the files and the directory structure is
taken directly from a live CI node, as printed by the (now-named)
`workdirs` step.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-14 18:49:32 +00:00
Gary Verhaegen
c2a6397751
re-enabble patch-bazel-windows (#12905)
This reverts a small part of 9e1e42d27c
(#12901).

Microsoft seems to have given us our free parallel jobs back, so we can
run the patch_bazel job again.

Fixes #12900.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-14 11:23:48 +00:00
Moritz Kiefer
9e1e42d27c
Drop dependency on hosted nodes (#12901)
This should hopefully get CI working again.

There are two changes in here:

1. We can no longer change our patched Bazel. I didn’t switch away
   from the current patched version for now (we upload it to gcp bucket
   so it still works fine even if we cannot build it) but if we upgrade,
   we need to go to an unpatched version for now.
2. We need to get `az` from dev-env. I tested the self service compat
   job stuff and it works fine with this but there is a chance other
   parts don’t.

changelog_begin
changelog_end
2022-02-14 02:49:38 +01:00
Moisés Ackerman
a179f03197
Enable go-to-definition for interfaces (#12865)
* Add goto definition test cases for exceptions and interfaces

changelog_begin
changelog_end
2022-02-11 11:01:30 +00:00
Moritz Kiefer
6a91fdfe22
Fix version check in docs cron (#12882)
2 is not a valid version

changelog_begin
changelog_end
2022-02-10 20:25:04 +00:00
mziolekda
42ff83d456
Remove daml on sql artifacts and docs (#12870)
* stop publishing daml on sql aka Daml Driver for PotgreSQL

CHANGELOG_BEGIN
Stop publishing Daml Driver for PostgreSQL
CHANGELOG_END
2022-02-10 18:01:18 +00:00
Gary Verhaegen
356dd58cf0
split: tell slack (#12874)
Also, change timing of nightly snapshot to work better with Canton.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-10 15:33:34 +00:00
Moisés Ackerman
a59156084f
Generate Eq instances for interfaces (#12850)
changelog_begin
changelog_end
2022-02-10 15:13:20 +00:00
Sofia Faro
55cada7c47
Make interfaceTypeRep return a TemplateTypeRep (#12838)
* Make interfaceTypeRep return a TemplateTypeRep

Part of https://github.com/digital-asset/daml/issues/12788

* Update bazel-haskell-deps and code

changelog_begin
changelog_end

* Add missing import

* update ghc-lib sha

* update bazel-haskell-deps
2022-02-09 15:39:08 +00:00
Gary Verhaegen
3f2499dd41
stop creating snapshot PRs (#12819)
In the new process we'll rely on nightly split builds instead.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-08 18:57:23 +01:00
Gary Verhaegen
70c13f2d7e
split: add provenance info (#12760)
This is somewhat redundant with the version number for snapshots, but
will be useful for stable releases.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-04 14:44:16 +01:00
Gary Verhaegen
8423732bdd
daily snapshot: pick better time (#12757)
CI nodes are reset at 4, which means starting at 3 doesn't leave us with
enough time to complete.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-04 12:45:52 +00:00
Gary Verhaegen
8033b36509
fix daily yml (#12751)
I was a bit too enthusiastic and merged before running.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-03 20:37:11 +01:00
Gary Verhaegen
ca976fe3d7
nightly split releases (#12744)
Because there's no reason not to. The only obstacle to automating the
normal release process is that we need an explicit manual validation
step for our audit log when creating a release, but split-releases are
created in the Assemblty repo, so we can have the audit log over there.

The diff is going to be very messy because there's a lot of stuff moving
around. The only thing that is not just moving a job to a separate file
is the `ci/daily-snapshot.yml` file, which is 100% new and is meant as
a new Azure Pipelines entrypoint (which I will create after this gets
approved). I have made a reasonable effort to create individual commits
that simplify reviewing, but I expect it's still going to be kind of a
mess. I'm open to opening separate PRs to ~bump my stats~ move one job
at a time if that makes reviewing (and testing) easier.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-03 19:05:35 +00:00
Moisés Ackerman
3ce272b9f0
Replace experimental interface primitives with proper LF primitives (#12678)
* Add new primitives to proto spec

* implement E{Signatory,Observer}Interface in terms of EResolveVirtual{Signatory,Observer}

* define EToTypeRep primitive in terms of EToTypeRep Expr

* Remove experimental primitives TO_TYPE_REP and RESOLVE_VIRTUAL_{SIGNATORY,OBSERVER} 

changelog_begin
changelog_end
2022-02-03 13:36:45 +00:00
Stefano Baghino
437fca801a
Remind to start the Windows testing machine early (#12731)
changelog_begin
changelog_end
2022-02-03 10:42:09 +00:00
Moisés Ackerman
e4764cc426
Upgrade to GHC 9.0.2 (#12300)
changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2022-02-01 11:27:11 +01:00
Brian Healey
ef18bf4219
DEV all caps needed to exclude dev dependencies (#12679) 2022-01-31 16:39:51 +00:00
Moritz Kiefer
84cec38456
Upgrade ghc-lib (#12664)
* Upgrade ghc-lib

Bumping to include https://github.com/digital-asset/ghc/pull/96

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2022-01-31 13:29:34 +00:00
Moisés Ackerman
f1560ce646
Support implements qualified interfaces (#12644)
changelog_begin
changelog_end
2022-01-31 09:55:57 +01:00
Remy
35eae895e4
Compiler: expose LF builtin ExerciseByKey (#12615)
With this change, Daml exerciseByKey use the LF primitive
ExerciseByKey instead of the combinason of FetchByKey + Exercise.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-28 16:29:16 +01:00
Gary Verhaegen
98e68427cb
ci: pin Windows folders, step 1 (#12597)
The mapping from Azure job to local folder is managed by a handful of
JSON files under `$WORKDIR/SourceRootMapping`. Based on the sketchy
[documentation] that screams "don't mess with these definitely internal,
subject-to-change files", it seeems to me that our best bet for pinning
Windows work folders is to mess with these files. Specifically, take a
"version" of these files we like from a live CI machine and add those
specific files to the init script of our Windows nodes.

[documentation]: https://github.com/microsoft/azure-pipelines-agent/blob/master/docs/jobdirectories.md

So the first step is to collect these files, which is what this PR aims
to accomplish.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-26 15:46:35 +01:00
Gary Verhaegen
42cf70b18e
ci: try to fix release process (#12600)
I'm not quite sure what's going wrong here, but this PR:

- Fixes a small bug in the process for determininng that we're _not_ in
  a split release, which worked because the boolean expression crashing
  is the same as the boolean expression returning false. But I'd still
  prefer if it returned false without crashing.
- Changes the condition for skipping the Windows installer so that in
  case of ternary+ logic we default to the harmless behaviour (including
  it).
- Makes a change that might have some impact maybe on the way Azure
  expands templates which may or may not result in the installer being
  excluded when it should be excluded. But this time if it doesn't work
  worst case we get an extra unused binary that uses some disk space,
  instead of crashing the release.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-26 13:57:39 +00:00
Moritz Kiefer
16a4f0626b
Avoid explicitly listing all Oracle tests in build.yml (#12594)
changelog_begin
changelog_end
2022-01-26 11:28:44 +00:00
Brian Healey
215a63d55c
correct deprecated options with newest synopsys-detect version (#12586)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-26 08:41:41 +01:00
Gary Verhaegen
ed33c0d5db
split: flat(ter) files in Artifactory (#12575)
The github/split-release split doesn't make sense at this level.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-25 16:41:55 +01:00
Gary Verhaegen
e355832bc1
split: do not push exe (#12574)
In the split release process, the executable installer has to be created
later in the pipeline, once we have the Canton parts available.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-25 16:29:57 +01:00
Brian Healey
73277f4210
Upgrade to oracle 19.14 image for ci (#12523)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-21 07:50:55 -05:00
Moritz Kiefer
d0813e61f1
Factor out version check in docs cron (#12459)
follow up to #12456

changelog_begin
changelog_end
2022-01-18 19:38:47 +00:00
Moritz Kiefer
01b0b76807
Support split releases in the docs cronjob (#12456)
Most of this is just documentation. The actual idea here is fairly
simple:

- The assembly repo pushes to S3 on each release (not yet implemented).
- The cronjob skips releases that are already there.
- Updating the top-level just piggybacks on what we already have.

changelog_begin
changelog_end
2022-01-18 16:05:31 +01:00
Moritz Kiefer
27bfd40365
Split Daml cron executable into separate modules (#12449)
This follows the approach we used for the BazelCache stuff and splits
the 3 different operations in 3 separate modules + one Github utility
module to make it a bit easier to follow.

This is pure reshuffling, no functional change.

changelog_begin
changelog_end
2022-01-18 09:46:29 +00:00
Gary Verhaegen
36a93ef0bf
try to fix paths in split-release (#12442)
See #12435.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-17 18:33:44 +01:00
Gary Verhaegen
502b21f830
split-release: publish temp files to artifactory (#12435)
See discussion on #12412 for details.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-17 15:40:20 +01:00
Moritz Kiefer
79428bb7b4
Add artifactory & SDK EE artifacts to split-release process (#12345)
Apologies for doing two things in one PR but they seemed somewhat
entangled.

For artifactory we follow the approach we use for Maven artifacts and
publish there directly.

For the SDK EE tarball, we just throw it in the split-release
directory and then the assembly repo can pick it up.

changelog_begin
changelog_end
2022-01-11 12:55:14 +01:00
nicu-da
ddf4f57b46
CI - Remove backwards compatible check for buf config. [KVL-1131] (#12301) 2022-01-07 02:00:02 -08:00
Moisés Ackerman
eff6df9e52
Fix {im,ex}plictly typoes (#12293)
changelog_begin
changelog_end
2022-01-06 19:15:01 +01:00
Hubert Slojewski
cb15ab5adb
Run protobuf compatibility checks for release branches [KVL-1197] (#12246)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-05 14:45:40 +00:00
Moisés Ackerman
ceb83a6ddb
Interface method sigs (#12258)
* Skip _method_ markers during docs generation

* Remove r argument from Method desugar type

* Update HasMethod/mkMethod docs

* define `mkMethod` as compiler "magic"

changelog_begin
changelog_end

Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
2022-01-05 13:09:36 +00:00
Gary Verhaegen
ea55ea2d14
Further copyright updates (#12249)
Somewhat error-prone, so please review carefully.

Reasons we need this:

- Some file types are not properly handled by the script.
- The only exclusion mechanism we currently have (`NO_AUTO_COPYRIGHT`)
  is overly coarse.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-04 16:32:17 +01: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
Brian Healey
dc6fdaaca9
revert back to running latest blackduck detect 6.9.0 (#12177)
* revert back to running latest blackduck detect 6.9.0

CHANGELOG_BEGIN
CHANGELOG_END

run-full-compat: true

* revert back to running latest blackduck detect 6.9.0

CHANGELOG_BEGIN
CHANGELOG_END

run-full-compat: true

* try increasing heap

10gb heap for blackduck scan

run-full-compat: true

* exclude bazel-out

run-full-compat: true

* separate blackduck scan stages
no signature or binary scan

run-full-compat: true

* exclude result- directories

run-full-compat: true

* do not follow symbolic links

run-full-compat: true

* exclude node rules

run-full-compat: true

* exclude node rules

    run-full-compat: true

* do not follow symbolic links for detector runs

run-full-compat: true

* yarn install language-support

run-full-compat: true

* exclude ts dirs

run-full-compat: true

* exclusions

run-full-compat: true

* all dirs

run-full-compat: true

* add go executable

run-full-compat: true

* no need for sig scan properties in go detector scan

run-full-compat: true

* Fixes # 6419 remove not-main for testing

* Update ci/cron/daily-compat.yml

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Update ci/cron/daily-compat.yml

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-12-21 18:08:42 +00:00
Moritz Kiefer
f847767e36
Avoid nix result-* symlinks on CI (#12220)
We really don’t want those anywhere and they currently trip up
blackduck which starts scanning our nix store.

changelog_begin
changelog_end
2021-12-21 07:59:02 -05:00
Moritz Kiefer
adb1f0e716
Split up docs postprocessing & release in split-release (#12176)
* Split up docs postprocessing & release in split-release

Follow up to #12172

The buld in the separate assembly should now only have to run the
sphinx-build step and then merge it with the non sphinx sources and
run lualatex on the pdf sources with the pdf fonts which is hopefully
simple enough that we can easily replicate it.

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-12-17 11:22:16 +01:00
Moritz Kiefer
d230cc88f6
Switch to new sonatype host (#12179)
They migrated our account so hopefully this should work without any
other changes and fix our publishing issues.

I’m keeping the long timeout for now since I don’t know what an
appropriate timeout is.

changelog_begin
changelog_end
2021-12-17 09:19:02 +01:00
Brian Healey
bb89f369c0
revert to use synopsys detect 7.1.0 (#12155)
* revert to use synopsys detect 7.1.0 run-full-compat: true

CHANGELOG_BEGIN
CHANGELOG_END

* run on branch run full compat

run-full-compat: true

* run on branch run full compat

run-full-compat: true

* revert changes to run branch
2021-12-15 14:39:28 -05:00
Robin Krom
5af58a1652
interfaces: doc generation for interface methods (#12096)
This adds documentation generation for interface choices and methods.

CHANGELOG_BEGIN
CHANGELOG_END
2021-12-15 13:57:09 +00:00