Skip to content

storage: strip inline comments from .pub, .group and .keys files#20

Merged
arvidj merged 2 commits intoahrefs:masterfrom
arvidj:aj/config_lines-comments
Mar 24, 2026
Merged

storage: strip inline comments from .pub, .group and .keys files#20
arvidj merged 2 commits intoahrefs:masterfrom
arvidj:aj/config_lines-comments

Conversation

@arvidj
Copy link
Copy Markdown
Contributor

@arvidj arvidj commented Mar 24, 2026

What

Update Storage.config_lines s.t. it strips inlines comments.

Why

Before the de-devkit-ization in #11, passage used the Action.config_lines function to read .pub, .keys and .group files. This function removes inline comments (i.e. content #comment is read as content), which I missed in my rewrite.

See also: ahrefs/devkit#56

@arvidj arvidj force-pushed the aj/config_lines-comments branch from 34774ea to 07c5338 Compare March 24, 2026 10:09
@arvidj arvidj mentioned this pull request Mar 24, 2026
Comment thread tests/inline_comments.t Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for cram tests, unit tests are enough

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed in latest version

@arvidj arvidj merged commit fb181c9 into ahrefs:master Mar 24, 2026
3 checks passed
thatportugueseguy pushed a commit to thatportugueseguy/opam-repository that referenced this pull request Mar 24, 2026
CHANGES:

## 0.3.4 (2026-03-24)
- `passage init` does not overwrite previous config unless `--force` is passed.
- Newline can be used to terminate user name input.
- Add `overlap` command to find recipients with the most secret overlap, to help coordinate key refreshes.
- `passage refresh` now warns when secrets are skipped due to lack of access.
- Fix bug where in-line comments in .pub, .keys and .group files were not ignored ([ahrefs/passage#20](ahrefs/passage#20)).

## 0.3.3 (2026-02-13)
- Update os availability in opam. Make passage available in macos again

## 0.3.2 (2026-01-20)
remove `devkit` dependency
remove `re2` dependency, use `re` instead
mark ppx-expect as `with-test`

## 0.3.1 (2025-12-04)
- Add installion state on `passage healthcheck command`
- Add `x-maintenance-intent` policy
- Add centos 10 to opam ci exclusions

## 0.3.0 (2025-12-02)
- Refactor passage to be lib-first. Commands and utility functions are now available for usage by lib users
- Update os availability in opam. Not available in macos anymore.

## 0.2.0 (2025-11-26)
- Update refresh command to handle users and groups via the @<user_or_group> target syntax
- Add --version flag to passage command
- Fix the command description for `new`

## 0.1.8 (2025-10-21)
- deep refactor of the code
  - more code moved to the lib, cleaner main.ml file
  - more abstractions, less indirection
  - updated the editor for reusability and robustness
  - removed lwt, since we don't really have true async code
  - use bos for command running and stdin/stdout/stderr handling
- removed lwt
- updated completions (bash and zsh)

## 0.1.7 (2025-09-15)
- Add --comment flag to the create command
- Add edit-comments command
- Show recipients in "user is not recipient" error
- Add add-who and rm-who commands
- Add groups suggestions to recipients suggestions
- Add `my` command
- Add better handling of bad setup for get and ls
- Improve error handling and message for missing setup
- Better error message when passage isn't setup
- Update Makefile
- Improve README and run linting
- Catch `realpath` error and raise friendlier exception
- Update bash completions
- Add zsh completions

## 0.1.6 (2024-11-28)
- fix small bug with the input_and_validate_loop fn and empty secrets

## 0.1.5 (2024-11-26)
- Add replace-comment command
- Make new and edit commands usage uniform
- Remove bash completions opam install. Moved to debian package.

## 0.1.4 (2024-08-26)
- Add bash completions on install

## 0.1.3 (2024-07-24)
- Add the public_name stanza to the passage lib

## 0.1.2 (2024-07-15)
- Update test config and add opam ci exclusions

## 0.1.1 (2024-07-11)
- Fix merlin dep and template parser

## 0.1.0 (2024-07-07)
- Open source passage
thatportugueseguy pushed a commit to thatportugueseguy/opam-repository that referenced this pull request Mar 24, 2026
CHANGES:

## 0.3.4 (2026-03-24)
- `passage init` does not overwrite previous config unless `--force` is passed.
- Newline can be used to terminate user name input.
- Add `overlap` command to find recipients with the most secret overlap, to help coordinate key refreshes.
- `passage refresh` now warns when secrets are skipped due to lack of access.
- Fix bug where in-line comments in .pub, .keys and .group files were not ignored ([ahrefs/passage#20](ahrefs/passage#20)).

## 0.3.3 (2026-02-13)
- Update os availability in opam. Make passage available in macos again

## 0.3.2 (2026-01-20)
remove `devkit` dependency
remove `re2` dependency, use `re` instead
mark ppx-expect as `with-test`

## 0.3.1 (2025-12-04)
- Add installion state on `passage healthcheck command`
- Add `x-maintenance-intent` policy
- Add centos 10 to opam ci exclusions

## 0.3.0 (2025-12-02)
- Refactor passage to be lib-first. Commands and utility functions are now available for usage by lib users
- Update os availability in opam. Not available in macos anymore.

## 0.2.0 (2025-11-26)
- Update refresh command to handle users and groups via the @<user_or_group> target syntax
- Add --version flag to passage command
- Fix the command description for `new`

## 0.1.8 (2025-10-21)
- deep refactor of the code
  - more code moved to the lib, cleaner main.ml file
  - more abstractions, less indirection
  - updated the editor for reusability and robustness
  - removed lwt, since we don't really have true async code
  - use bos for command running and stdin/stdout/stderr handling
- removed lwt
- updated completions (bash and zsh)

## 0.1.7 (2025-09-15)
- Add --comment flag to the create command
- Add edit-comments command
- Show recipients in "user is not recipient" error
- Add add-who and rm-who commands
- Add groups suggestions to recipients suggestions
- Add `my` command
- Add better handling of bad setup for get and ls
- Improve error handling and message for missing setup
- Better error message when passage isn't setup
- Update Makefile
- Improve README and run linting
- Catch `realpath` error and raise friendlier exception
- Update bash completions
- Add zsh completions

## 0.1.6 (2024-11-28)
- fix small bug with the input_and_validate_loop fn and empty secrets

## 0.1.5 (2024-11-26)
- Add replace-comment command
- Make new and edit commands usage uniform
- Remove bash completions opam install. Moved to debian package.

## 0.1.4 (2024-08-26)
- Add bash completions on install

## 0.1.3 (2024-07-24)
- Add the public_name stanza to the passage lib

## 0.1.2 (2024-07-15)
- Update test config and add opam ci exclusions

## 0.1.1 (2024-07-11)
- Fix merlin dep and template parser

## 0.1.0 (2024-07-07)
- Open source passage
arvidj pushed a commit to arvidj/opam-repository that referenced this pull request Apr 2, 2026
CHANGES:

## 0.3.5 (2026-04-02)

- Fix missing --version number.

## 0.3.4 (2026-03-24)
- `passage init` does not overwrite previous config unless `--force` is passed.
- Newline can be used to terminate user name input.
- Add `overlap` command to find recipients with the most secret overlap, to help coordinate key refreshes.
- `passage refresh` now warns when secrets are skipped due to lack of access.
- Fix bug where in-line comments in .pub, .keys and .group files were not ignored ([ahrefs/passage#20](ahrefs/passage#20)).

## 0.3.3 (2026-02-13)
- Update os availability in opam. Make passage available in macos again

## 0.3.2 (2026-01-20)
remove `devkit` dependency
remove `re2` dependency, use `re` instead
mark ppx-expect as `with-test`

## 0.3.1 (2025-12-04)
- Add installion state on `passage healthcheck command`
- Add `x-maintenance-intent` policy
- Add centos 10 to opam ci exclusions

## 0.3.0 (2025-12-02)
- Refactor passage to be lib-first. Commands and utility functions are now available for usage by lib users
- Update os availability in opam. Not available in macos anymore.

## 0.2.0 (2025-11-26)
- Update refresh command to handle users and groups via the @<user_or_group> target syntax
- Add --version flag to passage command
- Fix the command description for `new`

## 0.1.8 (2025-10-21)
- deep refactor of the code
  - more code moved to the lib, cleaner main.ml file
  - more abstractions, less indirection
  - updated the editor for reusability and robustness
  - removed lwt, since we don't really have true async code
  - use bos for command running and stdin/stdout/stderr handling
- removed lwt
- updated completions (bash and zsh)

## 0.1.7 (2025-09-15)
- Add --comment flag to the create command
- Add edit-comments command
- Show recipients in "user is not recipient" error
- Add add-who and rm-who commands
- Add groups suggestions to recipients suggestions
- Add `my` command
- Add better handling of bad setup for get and ls
- Improve error handling and message for missing setup
- Better error message when passage isn't setup
- Update Makefile
- Improve README and run linting
- Catch `realpath` error and raise friendlier exception
- Update bash completions
- Add zsh completions

## 0.1.6 (2024-11-28)
- fix small bug with the input_and_validate_loop fn and empty secrets

## 0.1.5 (2024-11-26)
- Add replace-comment command
- Make new and edit commands usage uniform
- Remove bash completions opam install. Moved to debian package.

## 0.1.4 (2024-08-26)
- Add bash completions on install

## 0.1.3 (2024-07-24)
- Add the public_name stanza to the passage lib

## 0.1.2 (2024-07-15)
- Update test config and add opam ci exclusions

## 0.1.1 (2024-07-11)
- Fix merlin dep and template parser

## 0.1.0 (2024-07-07)
- Open source passage
arvidj added a commit to arvidj/passage that referenced this pull request Apr 2, 2026
…efs#20)

* storage: strip inline comments from .pub, .group and .keys files

* fixup! remove cram test
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.

2 participants