Skip to content

Commit

Permalink
Add context info about binary files we're hashing. (#1453)
Browse files Browse the repository at this point in the history
  • Loading branch information
csasarak authored Jul 25, 2024
1 parent e745fd3 commit bc5cc84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/App/Fossa/BinaryDeps.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import App.Fossa.Analyze.Project (ProjectResult (..))
import App.Fossa.BinaryDeps.Jar (resolveJar)
import App.Fossa.VSI.Fingerprint (Fingerprint, fingerprintRaw)
import Control.Algebra (Has)
import Control.Effect.Diagnostics (Diagnostics)
import Control.Effect.Diagnostics (Diagnostics, context)
import Control.Effect.Lift (Lift)
import Control.Monad (filterM)
import Data.String.Conversion (toText)
Expand Down Expand Up @@ -44,7 +44,7 @@ analyzeBinaryDeps dir filters = do
-- if we fallback to a plain "unknown binary" strategy its name is reported as the relative path between the provided @Path Abs Dir@ and the @Path Abs File@.
-- If the path can't be made relative, the dependency name is the absolute path of the binary.
analyzeSingleBinary :: (Has (Lift IO) sig m, Has Logger sig m, Has ReadFS sig m, Has Diagnostics sig m) => Path Abs Dir -> Path Abs File -> m SourceUserDefDep
analyzeSingleBinary = resolveBinary strategies
analyzeSingleBinary root file = context ("Analyzing " <> toText file) $ resolveBinary strategies root file

findBinaries :: (Has (Lift IO) sig m, Has Diagnostics sig m, Has ReadFS sig m) => PathFilters -> Path Abs Dir -> m [Path Abs File]
findBinaries filters = walk' $ \dir _ files -> do
Expand Down

0 comments on commit bc5cc84

Please sign in to comment.