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

Path rewriting for setenv: and build-env: #5636

Merged
merged 14 commits into from
Nov 13, 2023
Merged

Commits on Nov 13, 2023

  1. Configuration menu
    Copy the full SHA
    8fff384 View commit details
    Browse the repository at this point in the history
  2. types: use a record for env_updates instead of a 4-uple

    type env_update = {
      envu_var : string;
      envu_op : OpamParserTypes.FullPos.env_update_op_kind;
      envu_value : string;
      envu_comment : string option;
    }
    rjbou committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    e32be04 View commit details
    Browse the repository at this point in the history
  3. env update: add a rewrite field.

    It contains rewriting rules of the environment variables to update:
    - not a path, no rewrite
    - formulaes to resolve to retrieve separator & path format
    - resolved formulaes, directly separator & path format
    
    This commit contains only the addition of the field, it does not
    performs the rewriting.
    rjbou committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    a00725c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f14a4c3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ef4491e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b530e3a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a67734e View commit details
    Browse the repository at this point in the history
  8. file: add opamfile x-env-path-rewrite field handling that specifies r…

    …ewriting rules for variables defined in `setenv` and `build-env`.
    
    Format is
    x-env-path-rewrite: [
      [ VAR false ] # no a path, no rewrite
      [ VAR ":" "target" ] # always use ":" and target format
      [ VAR (":" | ";" { os=win32 }) ("target-quoted" | "target" { os = win32}) ]
      # On windows use ";" separator and don't quote, otherwise ":" and quote the set/added path if needed.
    ]
    rjbou committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    35cb872 View commit details
    Browse the repository at this point in the history
  9. file: environment files now store rewriting rules.

    It keeps backward compatibility.
    
    Format is then:
    | VAR OP VALUE
    | VAR OP VALUE COMMENT
    | VAR OP VALUE norewrite COMMENT
    | VAR OP VALUE norewrite
    | VAR OP VALUE SEPARATOR PATH-FORMAT
    | VAR OP VALUE SEPARATOR PATH-FORMAT COMMENT
    rjbou committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    0574918 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    80eedda View commit details
    Browse the repository at this point in the history
  11. env: use defined rewriting rules (opam file, environment file, defaul…

    …t per variable) to compute environment updates
    rjbou committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    099727f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    8e65837 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a9015ff View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ec03971 View commit details
    Browse the repository at this point in the history