Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Support a celerity.json project configuration file #30

@alexrp

Description

@alexrp

Something like:

{
    "name": "my-app", // Unique project identifier.
    "path": "src", // Optional path containing the project's own source files. Defaults to src.
    "kind": "executable", // Optional project kind (executable, library). Defaults to executable.
    "license": "0BSD", // Optional SPDX license expression.
    "version": "1.0.0", // Optional Semantic Versioning 2.0.0 version. Defaults to 0.0.0.

    // List of module search paths. The runtime will match the module path against the
    // prefixes listed here and then look up the remainder of the module path in the
    // specified directory.
    //
    // So e.g. LibA::Foo would find LibA here and then locate dep/lib-a/src/foo.cel,
    // whereas Company::LibB::Bar::Baz would locate dep/lib-b/src/bar/baz.cel.
    "paths": {
        "MyApp": "src", // Only necessary if the app itself uses e.g. MyApp::Main.
        "LibA": "dep/lib-a/src",
        "Company::LibB": "dep/lib-b/src",
    },

    // Overrides default lint severities.
    "lints": {
        "unused-local-symbol": null, // Don't run this pass at all.
        "test-without-assert": "none", // Hide diagnostics from this pass.
        "unreachable-code": "error" // Promote diagnostics from this pass to errors.
    }
}

The tooling APIs will pick this up and use it appropriately for the various celerity CLI commands.

Note that nothing about this file will flow transitively; we're intentionally keeping things super simple. A top-level executable project will have to declare module search paths for all dependencies, direct or transitive, that it needs. Also, the file is completely optional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: buildIssues related to the build system.area: commonIssues related to the shared utility APIs.area: driverIssues related to the command line driver.area: testsIssues related to the test suite.area: toolingIssues related to the tooling layer.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions