aboutsummaryrefslogtreecommitdiffstats
path: root/app/History.hs
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2023-12-08 06:27:15 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2023-12-08 06:43:01 +0100
commit0d20548e3846cb80acca07fad2a1dc3cfe024528 (patch)
tree6605eb393af99914b4cce483f56e1becbcbe073d /app/History.hs
parent5842e730152a2ae11fc8772a505baa3ba81b1e9c (diff)
chore: drop tree-grepper
Regresses in that we only support Haskell for now, as Elm, Nix or Bash are not available as tree-sitter-* Haskell packages.
Diffstat (limited to 'app/History.hs')
-rw-r--r--app/History.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/History.hs b/app/History.hs
index 5b2dab3..d9f434d 100644
--- a/app/History.hs
+++ b/app/History.hs
@@ -6,6 +6,7 @@ where
import CMark qualified as D
import Cache (cachedMaybe)
+import Comment qualified as G
import Control.Exception (catch, handle, try)
import Data.Binary (Binary)
import Data.ByteString.Lazy qualified as LB
@@ -35,7 +36,6 @@ import Render qualified as P
import System.FilePath ((</>))
import System.IO.Temp (withSystemTempDirectory)
import System.Process.Typed (setWorkingDir)
-import TreeGrepper.Comment qualified as G
import Tuple ()
-- TODO Reduce cached data size
@@ -129,10 +129,10 @@ fromComment commitHash comment = do
in I.Issue
{ title = title,
description = N.nonEmpty parseResult.paragraphs,
- file = comment.file,
+ file = comment.filePath,
provenance = provenance,
- start = comment.start,
- end = comment.end,
+ startPoint = comment.startPoint,
+ endPoint = comment.endPoint,
tags = I.extractTags parseResult.tags,
markers = markers,
rawText = rawText,
@@ -143,7 +143,7 @@ fromComment commitHash comment = do
)
<$> I.parse I.issueMarkers (D.commonmarkToNode [] rawText)
where
- (commentStyle, rawText) = G.uncomment comment.file_type comment.text
+ (commentStyle, rawText) = G.uncomment comment.language comment.text
propagate :: CommitHash -> History -> Scramble -> IO History
propagate commitHash oldHistory scramble = do