* language: update on daml2js in app-arch section.
Update on the app-arch section in respect to daml2js. This is slightly
more precise about the contents of the generated libraries.
CHANGELOG_BEGIN
CHANGELOG_END
* Update docs/source/app-dev/app-arch.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Update docs/source/app-dev/app-arch.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
* language: remove file globs from ts library BUILD files
We replace them with toplevel `sources` definition, since sadly
filegroups don't work here.
CHANGELOG_BEGIN
CHANGELOG_END
* update app-arch section regarding daml2js
* remove files field in tsconfigs
Packages com.digitalasset.daml and com.daml have been unified under com.daml
Ledger API and DAML-LF DEV protos have also been moved from `com/digitalasset`
to `com/daml` on the file system.
Protos for already released DAML LF versions (1.6, 1.7, 1.8) stay in the
package `com.digitalasset`.
CHANGELOG_BEGIN
[SDK] All Java and Scala packages starting with
``com.digitalasset.daml`` and ``com.digitalasset`` are now consolidated
under ``com.daml``. Simply changing imports should be enough to
migrate your code.
CHANGELOG_END
* move JSON API doc to "Building applications"
* stop describing JSON API as experimental; limit to calling WebSocket endpoints alpha
* remove "(experimental)" from daml json-api docstring
* add changelog
CHANGELOG_BEGIN
- [JSON API] First stable version of the ``/v1`` endpoints, with
the exception of the WebSocket endpoints, which remain in alpha.
See `issue #4458 <https://github.com/digital-asset/daml/issues/4458>`_.
CHANGELOG_END
* move json-api in PDF ToC, adapting to #5411c496e2bf05
- pointed out by @cocreature; thanks
I've completely removed the possibility to call `daml codegen ts`. I'm
happy to add in back in a followup PR once I've seen that all our tests
pass without it existing.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
* Move quickstart to java bindings section
* Change title of quickstart to Getting Started with ...
* Move GSG to Getting Started (and rename in index)
* Rewrite a bunch of references to quickstart
* Update reference and give more specific name
changelog_begin
- [Docs] Replace IOU quickstart with full stack Getting Started Guide
changelog_end
* Replace daml-ledger link
* Use getting started guide in redirects
I've completely removed the possibility to call `daml codegen ts`. I'm
happy to add in back in a followup PR once I've seen that all our tests
pass without it existing.
CHANGELOG_BEGIN
CHANGELOG_END
CHANGELOG_BEGIN
- Move daml2ts, bindings-ts and JSON API out of experimental section in docs
- Rename Experimental to Early Access in docs and assistant
- Reorganise the docs a little bit to de-emphasise the Ledger API
CHANGELOG_END
This PR removes the code for publishing to Bintray and updates the
documentation to point to github releases or Maven central.
I had to slightly change the docs formatting since trying to use
markup in code blocks results in a horrible layout and I don’t want to
fix that atm.
I’ve removed all artifacts that were only published to Bintray.
changelog_begin
changelog_end
Our plan for `daml2js` is to populate the `name` and `version` field
of the generated `package.json` files with the name and version of
the input DALF. Once this is done, you would expect to refer to the
package generated from `create-daml-app-0.1.0.dar` via
```typescript
import ... from '@daml.js/create-daml-app';`
```
Since we currently depend on the package by file paths anyway, we can
already pretend to have the right behavior in place.
In this style you can also depend on two different versions of the same
DAML package. This will happen during upgrades, a situation we're
already facing in DAVL. There it can be solved via the following two
lines in the `dependencies` field of the `package.json`:
```
...
"davl-v4": "file:../daml.js/davl-0.0.4",
"davl-v5": "file:../daml.js/davl-0.0.5",
...
```
CHANGELOG_BEGIN
CHANGELOG_END
As expected, the `puppeteer` library used to demonstrate how to test
DAML apps end-to-end, causes issues in CI. It is not very unlikely
that users of the getting started guide would run into the same issues.
In addition, `puppeteer` is a _huge_ dependency, we should probably not
shove down everybody's throat who just wants to walk throught the GSG.
Thus, this PR moves everything related to testing out of
`create-daml-app` and exclusively into the docs. This is completly
lacking tests, but since it wasn't tested before either, I consider
this acceptable. My manual tests succeeded.
Since merging this might unblock quite a few other PRs, I defer test
into a followup PR.
CHANGELOG_BEGIN
CHANGELOG_END
* Copy templates into docs build directory to reference in code snippets
changelog_begin
changelog_end
* Remove ui-before code copies
* Rename daml folder to daml-after and remove tags for before code
* Fix a link and wording
* REPL parse import statements
* Factor parsing out of handleLine
* Pull binding and error handling into handleStmt
This is specific to the case of handling a statemt and does not overlap
with handling imports.
* Track module imports as ImportDecl
* Add new module imports
* Validate module imports
* Add REPL interaction test for import
* REPL document import declarations
CHANGELOG_BEGIN
- [DAML REPL - Experimental] You can now use import declarations at the
REPL prompt to bring additional modules into scope.
CHANGELOG_END
* ReplState strict fields
* Use semigroupoids Alt to simplify parseReplInput
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Change the output directory given to `daml codegen ts` from `daml-ts`
to `daml.js`. This is naming is in line with the fact that `daml2ts`
puts all generated packages into the `@daml.js` scope. A renaming of
`daml2ts` into `daml2js` is immiment.
This PR also changes a few small documentation issues the
search-and-replace has surfaced.
CHANGELOG_BEGIN
CHANGELOG_END
* non empty set of template IDs in domain.GetActiveContractsRequest
* Updating expected error message
changelog_begin
changelog_end
* Adding warnings field to domain.ErrorResponse
* Error messages constants
* using domain.AsyncResponse
* added todo
* Updating examples
changelog_begin
changelog_end
* Updating examples
* Fixing the case when head is part of the tail, as pointed by @S11001001
* Fixing the domain.SynResponse JSON reader,
report deserialization error when both 'errors' and 'result' fields
present, as pointed by @S11001001
* Addressing code review comments
* Limit memory usage of scenario service in tests
Previously the scenario service used over 2GB of memory during
//compiler/damlc/tests:integration-dev for absolutely no reason.
This PR adds an option to pass JVM options when starting the scenario
service and sets them to 200MB for the Shake tests and the damlc
integration tests which seems to be more than sufficient.
These option can also be set in `daml.yaml`. I did not change the
defaults since this is shipped to users where I’d rather have high
memory usage than a crashing scenario service and on certain large
DAML codebases we might actually use a fair bit.
changelog_begin
changelog_end
* Update docs/source/tools/assistant.rst
Co-Authored-By: Samir Talwar <samir.talwar@digitalasset.com>
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
* Initial commit with create-daml-app master
* Include create-daml-app in build rule
* Make daml.yaml a template in version and project name
* Remove git attributes
* Remove license and azure config
* Remove scripts
* Don't overwrite config files in build rule
* Template version numbers in package.json, to be replaced by the assistant
* Rename to package.json.template
changelog_begin
changelog_end
* Add copyright headers
* Do template substitutions in all .template files
And don't special case daml new create-daml-app (so it treats it as a
regular template).
* Add create-daml-app to integration tests
* Remove WIP warning
* Move towards setup that works on head
* Make local copies of the TS libs in the templates tarball
* Hardcode project name for now
* Use isExtensionOf
* Remove service worker
* remove robots.txt (don't even know what it is)
* Revert "Make local copies of the TS libs in the templates tarball"
This reverts commit 1289581fb4a82af3ab534baf978a2c6ed895d538.
* Retemplatize TS lib versions. For head builds these will be installed using npm
* Remove daml/ledger from resolutions for daml-ts
* Comment about test secret
* Remove special create-daml-app assistant command and test that won't work anymore
* Remove redundant imports and export
* Remove old create-daml-app tests
* Remove yarn.lock
* Clean up integration test (just daml new and build atm)
* Add daml/ledger as a resolution for daml-ts
* Remove top level package.json
* Update daml.js version
* Use new import scheme for generated TS
* Update readme with new codegen and build steps
* Use start-navigator in daml.yaml
* Increase a couple of timeouts in tests (either sandbox or TS lib is a bit slower?)
* Update GSG intro with new build steps
* Remove daml2ts -p flag and --start-navigator flag from GSG instructions
* Don't use start-navigator flag in ui tests
* Temporary readme describing how to manually test the create-daml-app template
* Update code samples in app arch section of GSG
* Update code samples in testing doc
* Remove copied create-daml-app code
* Indent docs markers to be more subtle
* Update visible code in Messages (after) section
This needs to be kept up to date properly somehow.
* Update text to useLedger
* Restore code/ui-before copies until the Bazel magic is figured out
We need to make the template code a dependency in the Bazel rule as
otherwise we can't find the files in the docs build.
* Update create-daml-app/readme and make templates/readme more detailed
* Use jsx comments for docs markers so they don't show up in the app
* Improve handling of exposed-modules with data-dependencies
Previously, we tried to rename all modules of a dependency via
--package. This fails if some of those modules are not exported. This
was trivial to hit as a user since the ``daml-trigger`` library made
use of this.
This PR adds a few things to improve the situation:
1. We only rename modules that are exposed. This fixes the issue if
you don’t actually reference a non-exposed module from your
data-dependency.
2. I’ve removed the exposed-modules from daml-trigger. I don’t think
they are essential here given that the module name has `Internal`
in the name and it’s too easy to have something that actually
references the non-exposed module since the types are reexported.
3. I’ve added documentation that mentions this issue.
4. I’ve added a warning if your exposed-modules are excluding some
modules. Maybe worth turning this into an error in the future.
changelog_begin
changelog_end
* Update compiler/damlc/lib/DA/Cli/Damlc/Packaging.hs
Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>
Co-authored-by: associahedron <231829+associahedron@users.noreply.github.com>
* Use com.daml as groupId for all artifacts
CHANGELOG_BEGIN
[SDK] Changed the groupId for Maven artifacts to ``com.daml``.
CHANGELOG_END
* Add 2 additional maven related checks to the release binary
1. Check that all maven upload artifacts use com.daml as the groupId
2. Check that all maven upload artifacts have a unique artifactId
* Address @cocreature's comments in https://github.com/digital-asset/daml/pull/5272#pullrequestreview-385026181
* report UnknownTemplateIds warning before sending an error
if no template IDs resolved, send warning before the error, this is for
consistency with the case when at least one ID resolved (we continue
processing request in this case).
changelog_begin
changelog_end
* adding an error message example
* change title
* clarifying what on-message means.
* formatting
* Addressing code review comments
* minor refactoring in preparation for the next test case
* allow only one input request + test, WIP
* allow only one input request + test, WIP
* Error when multiple requests coming over the same websocket connection
This never worked, we never returned anything when 2nd request received,
now we return an error and drop the connection.
changelog_begin
changelog_end
* update docs
* Fixing copyright header
* changing test description
* trying to clean wsMessageHandler up
* Reverting getTransactionSourceForParty changes
Using `on` to add event listeners is a Node.js idiom. In the brosers,
it's `addEventListener`, which works in Node.js too.
CHANGELOG_BEGIN
CHANGELOG_END
* Turn warnings for module name/record name mismatches into errors
The module name warning existed for ages. We started warning about the
record name mismatch in 0.13.55 so I’d like to turn it into an error
before 1.0
changelog_begin
- [DAML Compiler] File names must now match up with module names. This
already produced a warning in previous releases.
- [DAML Compiler] It is now an error to define a record with a single
constructor where the constructor does not match the type
name. To fix the error you need to change ```data X = Y { … }``` to
```data X = X { … }```. This restriction only applies to
single-constructor records. Variants and enums are not affected.
This already produced a warning in 0.13.55.
changelog_end
* Fix integration tests
* Fix docs
* Fix lsp tests
* Remove documentation for a removed option
CHANGELOG_BEGIN
- [DAML Integration Kit] The CLI option command-submission-ttl-scale-factor was
removed, as the LET/MRT/TTL fields have recently been removed
from the command submission service.
CHANGELOG_END
* Minor renaming
Semicolons at the end of every line seem to be good style. Logging to
the console does not help with the example. The `WebSocket` class is
built-in in the browser and you only need a package like `ws` on
Node.js.
CHANGELOG_BEGIN
CHANGELOG_END
* ContractKeyStreamRequest with different types for whether offset-preceded or not
- should replace EnrichedContractKey as the WS StreamQuery type
* add the ContractKeyStreamRequest layer everywhere
* split StreamQuery parse from the other steps
* make StreamQuery type depend on the input JsValue
* only StreamQueryReader is a typeclass now
* scalafmt
* wrong type arg
* letting the request data and phantom archive removal choice flow
- from work with @leo-da
* finish threading request-derived phantom state to removal flow
- from work with @leo-da
* make it clear that hints are contract IDs in StreamQuery
- from work with @leo-da
* treat StreamQueryReader's type parameter fully as a phantom
- from work with @leo-da
* remove unused type alias
- from work with @leo-da
* test fetch resume, with and without various offsetHints
* document offsetHints
* missing ` in rst
- thanks @hurryabit
* rename offsetHint to contractIdAtOffset
CHANGELOG_BEGIN
- [JSON API - Experimental] New field ``contractIdAtOffset`` for fetch-by-key streams
to restore proper archive filtering.
See `issue #4511 <https://github.com/digital-asset/daml/issues/4511>`_.
CHANGELOG_END
* we never unify the two ContractKeyStreamRequest types
* doc update for contractIdAtOffset
changelog_begin
[JSON API - Experimental]
Remove ``ledgerEffectiveTime`` and ``maximumRecordTime`` fields from command ``meta``. Remove ``--default-ttl`` command line argument. The ledger time and TTL are automatically computed by the submission service now. See #5090.
changelog_end
Contributes to #4194.
Closes#4231.
Closes#5022.
CHANGELOG_BEGIN
- [Ledger API] The protobuf fields ledger_effective_time and maximum_record_time have been removed from
command submission. These fields were previously deprecated following the introduction
of a new ledger time model. See issue `#4194 <https://github.com/digital-asset/daml/issues/4194>`__.
[Java Bindings] removed the usage of ledgerEffectiveTime and
maximumRecordTime, and instead added minLedgerTimeAbsolute and
minLedgerTimeRelative in CommandSubmissionClient and CommandClient
CHANGELOG_END
* Streaming API error handling
* Stopping the stream after emitting the 1st error
* Cleaning up test cases, stricter type for non empty streaming fetch
* Update docs.
changelog_begin
[JSON API - Experimental] Change Streaming API error format to match synchronous API:
``{"status": <400 | 401 | 404 | 500>, "errors": <JSON array of strings> }``. See #4521
changelog_end
* a few words about warnings in the Streaming API
* a few words about warnings in the Streaming API
* Updating command formatting in the JavaScript example.
* Integrate create-daml-app into the assistant
fixes#4868
changelog_begin
- [DAML Assistant] Add a new ``daml create-daml-app`` command for creating a project based on
`create-daml-app <https://github.com/digital-asset/create-daml-app>`_.
changelog_end
* Try random things hoping to fix windows
* Try random things hoping to fix things on macos
* remove `src` subdir from codgen command
If you don't do this, running `yarn install` will complain:
```
error Couldn't find package "@daml-ts/create-daml-app-0.1.0@0.13.55" required by "create-daml-app@0.1.0" on the "npm" registry.
```
This was with yarn v1.22.4 - can someone please double-check this.
* Update codegen command and some surrounding explanation
Unfortunately also removed a bunch of trailing whitespace due to my
editor settings, which is fine but makes reviewing harder :(
changelog_begin
changelog_end
* Warn that workspaces run build takes ages
Co-authored-by: Rohan Jacob-Rao <rohanjr@gmail.com>
* First draft of guide to UI testing
changelog_begin
changelog_end
* Address Nemanja's feedback
* Add copyright headers
* Cut down intro and description of Jest/Puppeteer
* Shorten a bit more
* Sandbox: Reveal contract id seeding flag
CHANGELOG_BEGIN
- [Sandbox] Add support for random contract identifiers. See section
`Contract Identifiers Generation` section in
docs/source/tools/sandbox.rst
CHANGELOG_END