Skip to content

Commit

Permalink
5/n Make OTP source available in elp parse-all
Browse files Browse the repository at this point in the history
Summary:
We need to OTP project to be available to load files from it in the erlang service.

Do this for `elp parse-all`, and insteady filter out otp files in the main processing loop.

It means the total file count is slightly overstated for the spinner, but no extra work is done.

Reviewed By: michalmuskala

Differential Revision: D60771098

fbshipit-source-id: 37e30267f4e79c5254a5eb8abe1a8f3766a93562
  • Loading branch information
alanz authored and facebook-github-bot committed Sep 5, 2024
1 parent 4873369 commit 86f2c0d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/elp/src/bin/erlang_service_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn parse_all(args: &ParseAll, cli: &mut dyn Cli, query_config: &BuckQueryCon
cli,
&args.project,
config,
IncludeOtp::No,
IncludeOtp::Yes,
Mode::Cli,
query_config,
)?;
Expand Down Expand Up @@ -95,6 +95,9 @@ pub fn do_parse_all(
if !buck && db.file_app_type(file_id).ok() == Some(Some(AppType::Dep)) {
return empty;
}
if db.is_otp(file_id).ok() == Some(Some(true)) {
return empty;
}

do_parse_one(db, Some((name, to)), file_id, format)
.with_context(|| format!("Failed to parse module {}", name.as_str()))
Expand Down

0 comments on commit 86f2c0d

Please sign in to comment.