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

khepri_export_erlang: Accept atoms and binaries as filenames #279

Merged

Conversation

dumbbell
Copy link
Member

Why

The file:name_all() type accepts atoms and binaries in its definition.

Also, Elixir strings are binaries really, so using "filename.erl" as the filename would break because the module would consider that binary filename as an already opened file descriptor.

How

The guard expression is expanded to accept atoms and binaries.

Fixes #278.

[Why]
The `file:name_all()` type accepts atoms and binaries in its definition.

Also, Elixir strings are binaries really, so using `"filename.erl"` as
the filename would break because the module would consider that binary
filename as an already opened file descriptor.

[How]
The guard expression is expanded to accept atoms and binaries.

Fixes #278.
@dumbbell dumbbell added the bug Something isn't working label Jul 24, 2024
@dumbbell dumbbell added this to the v0.15.0 milestone Jul 24, 2024
@dumbbell dumbbell self-assigned this Jul 24, 2024
Copy link

codecov bot commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.33%. Comparing base (dfad825) to head (3bf2e97).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #279      +/-   ##
==========================================
- Coverage   89.36%   89.33%   -0.04%     
==========================================
  Files          21       21              
  Lines        3084     3084              
==========================================
- Hits         2756     2755       -1     
- Misses        328      329       +1     
Flag Coverage Δ
erlang-25 88.48% <ø> (-0.10%) ⬇️
erlang-26 89.23% <ø> (+0.03%) ⬆️
erlang-27 89.26% <ø> (+0.06%) ⬆️
os-ubuntu-latest 89.33% <ø> (ø)
os-windows-latest 89.33% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dumbbell dumbbell marked this pull request as ready for review July 25, 2024 08:46
@dumbbell dumbbell merged commit 4c75a66 into main Jul 25, 2024
12 checks passed
@dumbbell dumbbell deleted the consider-binary-to-be-filename-in-khepri_export_erlang branch July 25, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using a binary filename with khepri_export_erlang does not work
1 participant