Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: Rework Opt value handling #767

Merged
merged 3 commits into from
Jun 19, 2023
Merged

all: Rework Opt value handling #767

merged 3 commits into from
Jun 19, 2023

Conversation

fmeum
Copy link
Contributor

@fmeum fmeum commented Jun 14, 2023

This is a complete rewrite of the logic underlying Opt, with the
following notable changes:

  • All options are now evaluated lazily, with safeguards ensuring that
    there can be no attempts to modify their defaults after they have been
    read once. This reduces the risk of accidentally locking in Opt
    and then reading stale values due to its previous reliance on static
    initializers.
  • There are now clear precedence rules for all options and every option
    can be set from all possible sources: manifest entries, env variables,
    system properties, configuration parameters, command-line arguments.

In follow-up PRs, the new capabilities of OptItem (e.g. accumulating
settings and JUnit configuration parameters as sources) will be used in
Jazzer.

@fmeum fmeum changed the title Fuzz 582 refactor config all: Read Opt values from manifest entries Jun 15, 2023
@fmeum fmeum force-pushed the FUZZ-582-refactor-config branch 3 times, most recently from 3c17113 to 8181236 Compare June 15, 2023 09:53
@fmeum fmeum changed the title all: Read Opt values from manifest entries all: Rework Opt value handling Jun 15, 2023
@fmeum fmeum marked this pull request as ready for review June 15, 2023 10:11
@fmeum fmeum requested a review from a team June 15, 2023 14:28
This is a complete rewrite of the logic underlying `Opt`, with the
following notable changes:
* All options are now evaluated lazily, with safeguards ensuring that
  there can be no attempts to modify their defaults after they have been
  read once. This reduces the risk of accidentally locking in `Opt`
  and then reading stale values due to its previous reliance on static
  initializers.
* There are now clear precedence rules for all options and every option
  can be set from all possible sources: manifest entries, env variables,
  system properties, configuration parameters, command-line arguments.

In follow-up PRs, the new capabilities of `OptItem` (e.g. accumulating
settings and JUnit configuration parameters as sources) will be used in
Jazzer.

Co-authored-by: Brian Lewis <brian.lewis@code-intelligence.com>
docs/common.md Outdated Show resolved Hide resolved
@br-lewis br-lewis merged commit f056298 into main Jun 19, 2023
9 checks passed
@br-lewis br-lewis deleted the FUZZ-582-refactor-config branch June 19, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants