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

Dune action-plugin: don't read unnecessary file contents #80

Merged
merged 1 commit into from
Mar 30, 2021

Conversation

anmonteiro
Copy link
Member

@anmonteiro anmonteiro commented Mar 28, 2021

In order to track dynamic dependencies we were:

  1. reading each *.d file produced by bsb_helper
  2. for each dependency in the *.d file, track it in dune by reading
    their file contents

We can avoid reading files into memory altogether by calling the
read_directory_with_glob function instead, which declares dependencies
on those files without reading their contents.

@anmonteiro anmonteiro force-pushed the anmonteiro/dont-read-files branch from 1b27c86 to 3ed9ae0 Compare March 29, 2021 08:30
In order to track dynamic dependencies we were:
1. reading each `*.d` file produced by `bsb_helper`
2. for each dependency in the `*.d` file, track it in dune by reading
   their file contents

We can avoid reading files into memory altogether by calling the
`read_directory_with_glob` function instead, which declares dependencies
on those files without reading their contents.
@anmonteiro anmonteiro force-pushed the anmonteiro/dont-read-files branch from 3ed9ae0 to 25ff0c6 Compare March 30, 2021 21:24
@anmonteiro anmonteiro merged commit a4eb34e into fork Mar 30, 2021
@anmonteiro anmonteiro deleted the anmonteiro/dont-read-files branch March 30, 2021 22:08
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.

1 participant