Commit Graph

622 Commits

Author SHA1 Message Date
Gary Verhaegen
961ca80b77
hunt down DAML (#13191)
Process:

- `git ls-files | xargs sed -i 's/DAML/Daml/g'`
- `git add -p`

To review:

- Check for false positives by carefully reviewing the diff in this PR.
- Check for false negatives with `git grep DAML`.

CHANGELOG_BEGIN
- Removed all traces of DAML. This may affect error messages and debug
  outputs.
CHANGELOG_END
2022-03-08 14:25:25 +01:00
Gary Verhaegen
54dc19deb8
add release instructions to release notification (#13160)
Because we can't expect people to magically know where to find them.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-04 11:33:15 +00:00
Gary Verhaegen
0002b7ebae
guard nightly (#13158)
In some cases we may end up with the tip of the main branch built as a
split release manually. When Azure then tries to run it, the release
fails (typically on the upload to NPM step).

Normally, Azure is set to run this only once per commit, but that only
applies when the run is successful. So if it breaks in a reproducible
way (e.g. because the version already exists on NPM), Azure will keep
trying every day.

This PR adds a simple guard that makes the nightly build _not_ a release
commit if the reelease already exists, which should short-circuit most
of the jobs in the build and finish successfully.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-04 11:16:01 +00:00
Victor Peter Rouven Müller
0dc167fa48
[JSON-API] Remove dependency on user provided tokens for the perf runner & refactor main (#13114)
* Don't error when user tokens are provided for the perf runner

changelog_begin
changelog_end

* Better token parsing error handling & extract user id to allocate the user if so

* make the code prettier

* Fix & simplify token parsing

* fix formatting of bazel file

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

Co-authored-by: Raymond Roestenburg <98821776+ray-roestenburg-da@users.noreply.github.com>

* correctly handle the response of createUser & don't throw if no LedgerId was found in the token

* Wrap exceptions in Futures

* Refactor Main.scala of the perf runner completely & remove dependency on user provided JWT's

* Minimize diff

* simplify code further

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Update ledger-service/http-json-perf/src/main/scala/com/daml/http/perf/Main.scala

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Fix build

* Don't pass a jwt to the perf runner anymore everywhere it was used & fix ledger id to be right

* Minimize diff

Co-authored-by: Raymond Roestenburg <98821776+ray-roestenburg-da@users.noreply.github.com>
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2022-03-03 16:12:40 +00:00
Moisés Ackerman
7ca26b01ce
make interface declaration where optional (#13129)
* Extend InterfaceSyntax test file with interfaces declared without 'where'

changelog_begin
changelog_end
2022-03-03 11:09:56 +00:00
Moisés Ackerman
2dbd91aab9
Interface methods can use plain function declaration syntax (#13102)
* Update 'implements' blocks to use new syntax

* Add InterfaceSyntax test case

* Add InterfaceMultipleMethodDeclsError test case

* Add InterfaceDifferentNumArgsError test case

changelog_begin
changelog_end
2022-03-02 15:59:01 +00:00
Moisés Ackerman
7af4215261
Interfaces accept at most a single ensure clause (#13093)
* Add test for multiple ensure declarations in interface

* update ghc patch

* Update expected result for daml-doc interface test

changelog_begin
changelog_end
2022-02-28 14:12:40 +01:00
Moisés Ackerman
42462f4574
Notify Moisés on slack (#13026) 2022-02-22 17:07:50 +00:00
Moisés Ackerman
2532cf8991
Derive Eq for interfaces (#12988)
changelog_begin
changelog_end
2022-02-22 16:33:48 +01:00
Robert Autenrieth
18b681f521
DPP-745 Add Oracle data continuity tests (#12961)
* Add Oracle compatibility tests

changelog_begin
changelog_end

* Clean up

* Remove debug change

* Skip Oracle tests if there is nothing to do

* Add missing line warp

* Use ORACLE_PORT

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
2022-02-16 23:37:50 +01:00
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
Sofia Faro
d1fb5e442c
interfaces: Implement 'requires' syntax (#12105)
* interfaces: Implement 'requires' syntax

part of: https://github.com/digital-asset/daml/issues/11978

ghc counterpart: https://github.com/digital-asset/ghc/pull/92

changelog_begin
changelog_end

* .

* ...

* ...

* ....

* ....

* update bazel-haskell-deps

* use requires syntax in tests

* .......

* .......

* update bazel-haskell-deps

* update InterfaceDesugared

* .........

* update bazel-haskell-deps

* ...........

* update bazel-haskell-depos

* update compile.yml

* update bazel-haskell-deps
2021-12-14 12:19:52 +00:00
Moritz Kiefer
346fecbb03
Publish damlc tarball cross-platform (#12103)
For now, I’ve emitted Windows since this is not an artifact we want to
publish externally and for Canton Linux & MacOS covers our usecases.

changelog_begin
changelog_end
2021-12-10 12:11:45 +00:00
Moisés Ackerman
0298ed3a21
Exercise interface (#12066)
* Define HasExerciseGuarded class

* Pass predicate to UExerciseInterface primitive

* Update InterfaceDesugared test file

* Add InterfaceGuarded test file

changelog_begin
changelog_end
2021-12-10 12:10:15 +00:00
Gary Verhaegen
255cdd178a
notify_user: wait for independence test (#12077)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-09 15:19:47 +00:00
Moritz Kiefer
0a17087b99
Publish split-release artifacts more granularly (#12072)
This publishes damlc & the Daml libraries as standalone artifacts so
Canton can avoid downloading the whole SDK tarball (hopefully).

changelog_begin
changelog_end
2021-12-09 13:45:58 +01:00
Sofia Faro
51cb552b79
Add typerep argument in UExerciseInterface call from daml (#11959)
changelog_begin
changelog_end
2021-12-08 13:25:45 +01:00
Moisés Ackerman
8df9a42f29
Interface desugaring cont. (#11964)
* Move toInterfaceContractId and fromInterfaceContractId out of Implements class

* Split Implements class into single-method classes

* Define toInterface outside its class to swap type arguments

This allows users to call 'toInterface @Interface', since the type of the template can usually be inferred

* Move interface classes and functions to DA.Internal.Interface

changelog_begin
changelog_end
2021-12-07 13:56:57 +01:00
Moritz Kiefer
5a019eaaa6
Split release process (PoC) (#11991)
* Split release process (PoC)

This PR adds the necessary infrastructure for the new split release
process. Releases are still triggered via the LATEST file but you can
choose between the old and the new release process by adding
SPLIT-RELEASE at the end of the line.

As a first step this publishes all artifacts we currently publish to
Github releases to our GCP bucket.

changelog_begin
changelog_end

* drop report-start

changelog_begin
changelog_end

* fix gcp bucket

changelog_begin
changelog_end

* review feedback

changelog_begin
changelog_end

* Update azure-pipelines.yml

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

* SPLIT-RELEASE ->SPLIT_RELEASE

changelog_begin
changelog_end

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2021-12-06 19:25:00 +01:00
nicu-da
383e251e88
[kvutils] - Rename expire_at to prunable_from for clarity [KVL-1199] (#11960)
changelog_begin
changelog_end
2021-12-06 00:02:26 -08:00
Moisés Ackerman
ad77eed798
Move method interfaceTypeRep to its own class (#11940)
changelog_begin
changelog_end
2021-12-04 15:33:58 +00:00
Moisés Ackerman
0b79d8ae7c
Deprecate 'controller ... can' syntax (#11363)
Closes #11317

* Add warning for uses of 'controller ... can' syntax

* Remove uses of 'controller ... can' syntax

* Add test cases for -W{,no-}controller-can

* Update docs to reflect 'controller ... can' syntax deprecation

changelog_begin
* Deprecate 'controller ... can' syntax.
  * It will be removed in a future version of Daml.
  * Instead, use 'choice ... with ... controller' syntax. Note that this does not implictly add the controller as an observer, so it must be added explictly as one (or as a signatory).
changelog_end
2021-12-01 13:36:04 +01:00
Moisés Ackerman
683ab87143
Move ghc-lib{,-parser} to bazel-haskell-deps (#11775)
* Move ghc-lib{,-parser} to bazel-haskell-deps

changelog_begin
changelog_end

* Always show changes to bazel-haskell-deps.bzl
2021-11-30 18:11:33 +00:00
Gary Verhaegen
4e50060021
self-service compat: set branch name to not main (#11902)
The "tell slack about failures" step is conditional on the branch name
being main; for whatever reason if we don't supply a branch name Azure
sets it to `main`, regardless of the fact that the commit is not in that
branch at all.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 16:50:53 +00:00
Gary Verhaegen
a81995c82e
switch dev images to Temurin (#11895)
The AdoptOpenJDK project has been renamed to Adoptium so they renamed
the adoptopenjdk images to Temurin.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 14:45:35 +00:00
Moritz Kiefer
68a23436e8
Only run self-service compat job on PRs (#11893)
This is currently failing for the notice file update PR. While we
could try to hack around the git commands to do something sensible, I
don’t really see the point. We really only need this for PRs.

changelog_begin
changelog_end
2021-11-26 10:26:21 +01:00
Gary Verhaegen
dbda67ba81
bump JVM in Docker image (#11883)
Please don't depend on this, it breaks all the time.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-25 18:08:38 +01:00
Gary Verhaegen
b8937ad81b
ci: self-service compat test start (#11853)
It should now be possible for anyone to trigger the daily compat build
by adding a `run-full-compat: true` trailer to their commit message.

CHANGELOG_BEGIN
CHANGELOG_END

run-full-compat: true
2021-11-24 18:05:04 +00:00
Moritz Kiefer
32e9c4b13a
Bump go rules (#11829)
* Bump go rules

Was debugging something else and this seemed simple enough to factor
it out.

changelog_begin
changelog_end

* Bump Bazel on Windows

changelog_begin
changelog_end

* bump bazel manifest

changelog_begin
changelog_end
2021-11-23 18:58:55 +00:00
Moisés Ackerman
d23d113667
Restructure interface desugaring (#11555)
* Update ghc patch

* Replace Implements proxy datatype with a class

* Expose 'Implements' class in Prelude

* Add DA.Internal.Desugar.HasMethod class

This allows us to get the type of a method of an interface through the functional dependency

* Convert interfaces from new desugaring

* Update Interface daml-test-file to use Interface class functions

* Update InterfaceDesugared daml-test-file

* Replace remaining uses of Is<Interface> methods with Implements

* Document HasMethod, Method and mkMethod

* Ignore _method_ bindings in convertBind

* Ignore interface desugaring types/classes/instances/functions in LF conversion

* update snapshot after pin on windows

changelog_begin
changelog_end
2021-11-19 10:06:49 +01:00
Moritz Kiefer
91b4fb9acf
Backport: Skip protobuf compatibility check for PRs to non-main (#11772)
Backport from #11770

changelog_begin
changelog_end

Co-authored-by: Nicu Reut <nicu.reut@digitalasset.com>
2021-11-18 14:33:45 +00:00
Moritz Kiefer
a3556a57ae
Retry release signature checks (#11771)
changelog_begin
changelog_end
2021-11-18 14:09:42 +00:00
Moritz Kiefer
bb19c0de91
Drop Scala 2.12 support (#11619)
* Drop Scala 2.12 support

This only includes the CI/build system infrastructure
changes. Dropping compatibility layers from our code for 2.12 can be
done separately.

This is fine even in the context of backport builds since we already
disable the Scala 2.12 job for those anyway.

fixes #11315

changelog_begin
changelog_end

* Update bazel-java-deps.bzl

Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>

Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>
2021-11-17 18:38:43 +01:00
Moritz Kiefer
d3bb036591
Fix sandbox database config in script & trigger tests (#11655)
* Fix sandbox database config in script & trigger tests

Setting jdbcUrl does absolutely nothing because it later gets
overwritten again.

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-11-12 06:18:12 +00:00
Moritz Kiefer
cf445b2e73
Skip platform independence tests on release PRs (#11631)
* Skip platform independence tests on release PRs

changelog_begin
changelog_end

* yaml that shit

changelog_begin
changelog_end
2021-11-10 12:55:33 +00:00
Moisés Ackerman
cfd521ff86
Fix GHC build errors on macOS (#11560)
changelog_begin
changelog_end
2021-11-09 14:42:52 +01:00
Robin Krom
af1bee7b82
precondition lf conversion (#11538)
* interfaces: lf conversion of preconditions

This adds the LF conversion of preconditions from the desugared GHC code
to Daml LF for preconditions. This depends on the corresponding patch of
the GHC fork.

CHANGELOG_BEGIN
CHANGELOG_END

* pin linux stackage snapshot

* added a test

CHANGELOG_BEGIN
CHANGELOG_END

* pinned linux stackage snapshot

CHANGELOG_BEGIN
CHANGELOG_END

* additional InterfacePrecondition test

this checks that that conjunction of all preconditions of intererfaces
and templates is checked.

CHANGELOG_BEGIN
CHANGELOG_END

* pin stackage snapshot

* pin windows stackage snapshot

* update compile.yml (again)

* pin linux stack snapshot

* fix InterfacePrecondition test

* pin windows stackage
2021-11-09 11:43:46 +00:00
Moisés Ackerman
7d68e05f7f
Remove virtual choices (#11482)
* Remove virtual choices

* Remove choices without a body in 'interface' definition
* Remove choices in 'template ... implements' section

part of #11372

changelog_begin
changelog_end

* Remove virtual choices cont.

Switch uses of virtual choices to fixed choice with method implementation

* update snapshot after pin on windows

* Disable failing interface tests with TODO #10810
2021-11-08 17:05:23 +01:00
Hubert Slojewski
9e045c105b
Remove a leftover from check-protobuf-stability.sh (#11513)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-02 17:11:17 +00:00
Gary Verhaegen
79505b5474
oracle debug (#11386)
Collect Oracle logs for further debugging.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-01 12:19:01 +01:00
Robert Autenrieth
927b2378c3
Make Oracle tests exclusive (#11408)
* Make Oracle tests exclusive

This attempts to solve connection timeouts we often see in tests.

changelog_begin
changelog_end

* Revert "Make Oracle tests exclusive"

This reverts commit 7804c433b3476542fc156cad9d4da4755740b123.

* Run all Oracle tests sequentially
2021-10-27 16:01:00 +02:00
Robin Krom
12e782b1ea
ifaces: update ghc-parser (#11383)
* ifaces: update ghc-parser

This updates the ghc-parser, including the `ifaceTypeRep` method
generation for interfaces.

CHANGELOG_BEGIN
CHANGELOG_END

* pin stack snapshot on unix

* add tests

* update ghc-lib hash

* pin stackage dependencies on unix

* pinned stackage windows
2021-10-27 11:29:22 +00:00
Sofia Faro
76eb1657d2
Interface fixed choices: ghc parser (#11275)
* Interface fixed choices: ghc parser

(WIP)

changelog_begin
changelog_end

* .

* ..

* ...

* stackage unpin unix

* ...

* fold create/observer/signatory into fake lfconversion primitives

* stackage unpin

* .....

* ......

* ........

* .........

* . . . . .

* unpin stackage on unix

* ...... ......

* ...

* . . . . .

* unpin stackage on unix

* . . . . . . . . .

* unpin stackage on unix

* Loosen restriction on ETo/FromAnyChoice fake primitives

* uncomment exercise in Interface.daml

* remove comments

* !!!

* the final re-pinning, part 1

* the final re-pinning: part 2
2021-10-20 17:45:13 +00:00
Samir Talwar
139b6f3b9e
CI: Set PROJ_DIR inside the bash lib, not outside. (#11236)
* CI: Set `PROJ_DIR` inside the bash lib, not outside.

We can't reference variables set outside.

CHANGELOG_BEGIN
CHANGELOG_END

* CI: Remove an unnecessary `export`.
2021-10-13 14:55:20 +02:00
Robert Autenrieth
66adbc0366
DPP-463 switch conformance tests to append only (#11101)
* Use append-only schema in tests

changelog_begin
changelog_end

* Fix Oracle build

* Update ledger/ledger-on-memory/BUILD.bazel

Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>

* Run more conformance tests on append-only

* Run pruning tests in split-participant mode

* Disable multi-participant test in split participant

* Add missing ContractIdIT test

Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>
2021-10-11 23:31:30 +02:00
Robin Krom
3115d104aa
daml script interfaces (#11124)
* interfaces: introduce TemplateOrInterface class in stdlib

The template typeclass is to strong for many applications. The new
constraint `TemplateOrInterface` only contains the methods to convert
contract IDs and choices.

CHANGELOG_BEGIN
CHANGELOG_END

* ghc-lib update, interface script tests

* pinned stackage on unix

* added missing implementation in preprocessor

* added test

* fixing tests

* remove Iface type

* pinned stackage windows

* make sure createAndExercise is not called on interfaces
2021-10-11 18:22:40 +02:00
nicu-da
5abedac9ab
Check the commit message to skip the compatibility check [KVL-1111] (#11162)
* Check the commit message to skip the compatibility check

CHANGELOG_BEGIN

CHANGELOG_END

* Use git trailers to skip the check conditionally
2021-10-08 02:18:36 -07:00
Samir Talwar
d3810af47e
CI: Upgrade Nix. (#11173)
Inspired by seeing `curl` TLS errors in a different repository's CI.

I don't know if this will help, but it's worth a try. Note that the
domain name has changed.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-08 09:13:50 +00:00
Gary Verhaegen
fcd4549569
test release rotation: factor out selection (#11161)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-07 12:46:55 +00:00
nicu-da
a3b90499fd
Check proto compatiblity with target head for PRs [KVL-1110] (#11123)
* Add the ability to check protobuf compatibility with the branch head alongside the latest release tag.

CHANGELOG_BEGIN
CI - add check to PR for protobuf breaking changes against the target branch head
CHANGELOG_END
2021-10-07 08:55:38 +00:00
Stefano Baghino
265e36255c
Add a notice to the release testing rotation file (#11142)
Reminds people adding new users to the rotation that they should also
be added to DACH-NY/daml-language-ad-hoc to have a box in the cloud
for Windows testing.

Adds the possibility of adding comments at the beginning of the rotation file.

changelog_begin
changelog_end
2021-10-06 21:08:11 +00:00