aiken/crates/aiken-project/src
KtorZ fbe2f82582
Thread down environment module from cli down to the type-checker
We simply provide a flag with a free-form output which acts as
  the module to lookup in the 'env' folder. The strategy is to replace
  the environment module name on-the-fly when a user tries to import
  'env'.

  If the environment isn't found, an 'UnknownModule' error is raised
  (which I will slightly adjust in a following commits to something more
  related to environment)

  There are few important consequences to this design which may not seem
  immediately obvious:

  1. We parse and type-check every env modules, even if they aren't
     used. This ensures that code doesn't break with a compilation error
     simply because people forgot to type-check a given env.

     Note that compilation could still fail because the env module
     itself could provide an invalid API. So it only prevents each
     modules to be independently wrong when taken in isolation.

  2. Technically, this also means that one can import env modules in
     other env modules by their names. I don't know if it's a good or
     bad idea at this point but it doesn't really do any wrong;
     dependencies and cycles are handlded all-the-same.
2024-08-04 10:27:32 +02:00
..
blueprint Prune pallas dependencies. 2024-08-03 14:14:49 +02:00
deps Throttle calls to package registry for version resolution 2023-09-13 17:17:32 -04:00
github `aiken new`: Try to get the latest tag of stdlib 2023-08-16 22:30:15 -04:00
snapshots Add 'diagnostic' to the prelude, as well as companion functions. 2024-07-19 12:28:07 +02:00
tests Thread down environment module from cli down to the type-checker 2024-08-04 10:27:32 +02:00
utils Refactor creation of CodeGenerator and management of known data_types and functions. 2024-03-03 19:33:26 +01:00
config.rs feat: add compiler version to aiken.toml 2024-05-22 15:35:57 -04:00
deps.rs Throttle calls to package registry for version resolution 2023-09-13 17:17:32 -04:00
docs.rs Do not generate documentation for empty modules. 2024-03-15 21:40:57 +01:00
error.rs Parse sources of conditional env modules. 2024-08-03 17:42:55 +02:00
export.rs test: add some snapshot tests for export type 2024-04-08 14:30:07 -04:00
format.rs chore: bow to the clippy 2023-03-14 17:03:28 -04:00
lib.rs Thread down environment module from cli down to the type-checker 2024-08-04 10:27:32 +02:00
module.rs Thread down environment module from cli down to the type-checker 2024-08-04 10:27:32 +02:00
options.rs Thread down environment module from cli down to the type-checker 2024-08-04 10:27:32 +02:00
package_name.rs Auto-derive 'Debug' trait instance for types in deps 2023-09-13 17:17:32 -04:00
paths.rs Throttle calls to package registry for version resolution 2023-09-13 17:17:32 -04:00
pretty.rs Add one more edge-case test for multiline. 2024-08-01 15:21:53 +02:00
telemetry.rs Introduce 'fail once' and alter behavior of 'fail' keyword for properties. 2024-05-30 17:18:50 +02:00
test_framework.rs Thread down environment module from cli down to the type-checker 2024-08-04 10:27:32 +02:00
watch.rs Cargo fmt 2024-03-08 20:43:27 -05:00