Skip to content

Supporting Build Profiles #8

@DavePearce

Description

@DavePearce

It seems useful to support the concept of build profiles. But, what is this? Examples of build profiles:

  • Debug. Used for ensuring appropriate symbol information is contained.
  • Test. Used for testing, and enables instrumentation for path coverage, etc.
  • Dev. Standard profile, used in the normal course of events. Perhaps does not apply optimisation (e.g. unminified JS source)
  • Release. Final profile which may have various optimisations enabled (e.g. minification if JS)

At this point though, it's not clear exactly how we specify profiles and how many are supported, etc. Generally speaking, we'd expect a folder organisation to be something like this:

wy.toml
src/whiley/main.whiley
src/js/native.js
bin/debug/main.wyil
bin/debug/main.js

Here, the profile determines where the resulting binary code is actually placed. Some issues:

  • How to specify different options for different profiles? Each Build.Platform instance may have different options depending on the profile.
  • Support custom profiles? Do we have a fixed set of predefined profiles, or do we allow for custom profiles?

Obviously, the advantage of having predefined profiles like debug, test, etc, is that the various Build.Platforms can have default settings for them (e.g. minification in release profile, etc).

See: https://doc.rust-lang.org/book/second-edition/ch14-01-release-profiles.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions