The current naming suggests, the protobuf encoding and the CLI use different
textual representations of minor versions, which is not true. They only
differ in their types. We push this type conversion to the call sites
of both functions instead.
Currently, we test the default and the newest DAML-LF version. After the
recent introduction of 1.dev, this doesn't make sense anymore. Instead, we
now test the default version (which should always be the newest version)
and the dev version.
* Rename the #ifdef for GHC_STABLE
* More CPP required for GHC stable
* Add a compatibility wrapper for HIE functionality which is new in GHC HEAD
* HLint ignores
* Finish the dummy implementations
* Add a bazel build for the ide-core library against GHC
* language: fix: move interface files to a different
This fixes https://github.com/digital-asset/daml/issues/1009. We move
the created interface files and hie files to a hidden directory
".interfaces" when creating a package.
* removing the ifaceDir option and hardcode the dir
Up to now, the engine blindly assumed that contract ids pointed to
contracts of the right type. However, this assumption is faulty:
contract ids coming from the Ledger API cannot be type checked
in command translation since we need access to the contract itself
to do so.
This caused some seriously surprising / broken behavior: one could
send an exercise command with the wrong template id and still go
through, or break internal invariants about the type of choices.
This commit fixes this by checking that the type of the contract
instances we fetch is correct at runtime.
cc @hurryabit @dajmaki @remyhaemmerle-da @S11001001 @meiersi-da
* compiler: follow ghc convention and put conf files in package.conf.d dir
We follow the ghc convention and locate all .conf files for the package
database in the `package.conf.d` dir.
* addressed neil's comment
* Implement cross-package goto definition
This is more tricky than one might think at first:
- The interface files do not contain proper source spans so we cannot
use the information in there.
- We could theoretically try to get the source location from the DALFs
but that is the wrong layer and also not an option when we want to
act as a Haskell IDE.
So what we do instead is whenever we write interface files we also
write .hie files and consult those instead when we get useless source
spans otherwise.
* Move optLocateHieFile and optLocateSrcFile to a separate type
* Remove a duplicated comment
* Remove traverse from the convertor
* Move removing typeable to the converter
* Don't reexport getGhcCore
* Move coresForFile to its usage
* Just print out the GHC Core for everything, including internal modules
* Move modIsInternal out of haskell-ide-core
* Move some DynFlags setters over to Config
* Remove an unused orphan instance
* Move the orphans out to a different module
* Move functions for generating import syntax out of haskell-ide-core
* Expose fakeDynFlags as a blob, not the pieces
* Clean up the definition of fakeDynFlags
* Inline showSDocDefault
* HLint
* Fix the comment on IDE.Orphans
* Split the Options into a separate module
* Make the Logger handle live in IO
* Reduce the amount of IDE logging to just two
* Rename CompileOpts to IdeOptions
* Rename PackageState to PackageDynFlags
* Clean up setting the PackageDynFlags
* Stop hiding PackageState, we no longer clash on it
* Introduce a helper for collecting the package flags
* Move the StringBuffer conversion to its only use
* I have no idea now LPat and Pat previously managed to unify...
* Avoid using unRealSrcSpan as its only introduced for GHC 8.8
* Add some CPP to permit compiling with GHC 8.6
* Permit CPP in one more place
* Remove the requirement for Binary on Shake rules (was not used)
* Add a deriving Show on Event, easier for external integrations
* Rename GeneratePackageState to LoadPackageState and move its fields to the rule, rather than the key
* Inline getPackageState away
* Change to passing a ModRenaming to the package loader. Two reasons:
1) When loading non-DAML things we might want to omit the renaming
2) The type ModRenaming has documentation of semantics, unlike [(String, String)]
* Use DA.Prelude a lot less
* Make LANGUAGE pragmas have the right case
* Don't reexport DA.Prelude
* Remove more DA.Prelude imports
* Remove the nastiest renaming DA.Prelude
* Final removal of DA.Prelude
* Kill DA.Prelude
* Add missing dependencies
* More missing package imports
* More missing package imports
* Update compiler/daml-lf-ast/src/DA/Daml/LF/Ast/Base.hs
* Update compiler/daml-lf-ast/src/DA/Daml/LF/Ast/Base.hs
Before it was garbled and wrong:
Range: Range Start: Position Line: 2Character: 15End: Position Line: 2Character: 15
After it's correct and like it was before:
Range: 3:15-3:17
* clean up v3 contract key case in TransactionVersions
* clean up duplicate cases in ValueVersions.assignVersion
* make LanguageMinorVersion a proper ADT, aliased LanguageVersion.Minor
* port DecodeV1 to LanguageMinorVersion ADT via implicit conversion
- @remyhaemmerle-da might prefer the explicit application of Stable/Dev
* make releasePrecedes private
* add dev versions to the timeline
* copyright header for LanguageMinorVersion
* build the package database for 1.dev, support 1.dev as --target
* test presence and new-ness of "dev" in timeline
* report dev versions in engine info; note 1.dev target in release notes
* spec and governance rules on 1.dev and minor dev in general
* make the governance rule about dev more direct
* 1.x
* missed plural; thanks @leo-da
* further definition of 1.dev in LFv1 spec; thanks @remyhaemmerle-da
* Drop DAML-LF 1.0 support from compiler
This will enable us to add `Functor`, `Applicative` and `Monad` instances
for `(->) r` in the `daml-stdlib`. We'll do this in a separate PR.
* Remove codegen test for DAML-LF 1.0
* Make all Text tests be qualified to Scenario
* Remove the big list of tests from Text test
* Add DA.Text.reverse
* Move LitString decoding out to UtilGHC
* Rename the functions to match their GHC counterparts
* Fix pretty printing of LF strings containing weird characters, e.g. NUL or "
* Move to using an unpackCStringUtf8 which copes with GHC-style nuls
* Add lots of tests around NUL characters
* Use a safer CString function
* Delete an entirely unused module
* Delete an entirely unused module
* Switch the compiler to use EUnit over mkEUnit
* Delete an unused module
* Whitespace only
* Clean up the API for World, don't expose the internals, better creation functions
* Clean up the type checker environment, don't expose the internals of Gamma, add a few helper functions
* Delete unused functions
* Explicit module export lists
* Fix the nub replacement hints
* Turn on the warning that we require module export lists
* Add an explicit export list
* Move from prettyDiagnostic to prettyDiagnostics
* Remove as much pretty print stuff as we can
* Try moving duplicate named functions with similar semantics and identical types to different names
* Change to returning pretty printed outputs from Diagnostics
* Remove a redundant import
* Make the ScenarioService take an IO callback, not STM
* Remove a redundant space
* Use IO in preference to STM where we really don't care which is in use
* #564, always print out diagnostics for tests
* #564, fix getting the scenario names so if they can't be computed you give an answer
* Add a proper data type to represent pass/fail in the tests
* Centrailse printing a failure message
* Pull the test execution into a separate file, ensuring it always gives back an exit code
* Use nubOrd instead of Set
* Clean up how we figure out which files to test
* Fail if there are any errors
* Delete all the brittle failure tracking stuff
* Rename the compiler handle to h
* Only print out the successful results to stdout, since the unsuccessful ones end up in diagnostics
* Make JUnit output still print out the test results
* Make JUnit print out all the details
* Delete the stdio command path
* Break the bigger pieces apart in the test runner
* Inline testJUnit
* Shorten to UseColor
* Shorten to color
* Inline and comment part of the JUnit tests
* HLint
* Update daml-foundations/daml-tools/da-hs-daml-cli/DA/Cli/Damlc/Test.hs
Co-Authored-By: neil-da <35463327+neil-da@users.noreply.github.com>
* Fix an HLint refactoring snafu
* Fix up the damlc tests
* Tighten up a test by demanding it throws ExitFailure
The only usage of `encodeHash` is in `DA.Daml.LF.Proto3.Archive`. This used
to be different in the past but since it isn't anymore there's no more
justification for a separate module for a single function.
* removing major LF dev version from Haskell proto codecs
* removing major LF dev version from scenario service client
* missed import
* remove Scala support for dev major version; remove --allow-dev option from sandbox cli
* Version.minorFromCliOption function
* don't build daml-stdlib artifacts for dev major
* remove damlc CLI --target dev
* release note about removed dev major LF version
* governance now discusses minor dev, no more major dev
* don't build from daml_lf_dev.proto anymore
* remove daml_lf_dev.proto
* raise deprecated release
* reserve 9999 in the ArchivePayload sum, as suggested by @bitonic
* use reserved proto keyword, as suggested by @bitonic
- `reserved` cannot occur within `oneof` block
* remove --allow-dev test
* dev removal release note followed the previous release; move it back to HEAD
* Move the IdeResult term into the A data type
* Nothing ever consults the errors stored in A, so stop storing them
* Use the new Shake MonadFail Rules instance
* Document the information in the Shake database
* More documentation of the data in the Shake service
* Change getValues to avoid getting the diagnostics
* Avoid fmap over a pair, a bit weird