Skip to content

Commit 4f505e5

Browse files
committed
chore: switch from stan to plu-stan
1 parent 27f8c3d commit 4f505e5

File tree

2 files changed

+40
-6
lines changed

2 files changed

+40
-6
lines changed

cabal.project

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
repository cardano-haskell-packages
2+
url: https://chap.intersectmbo.org/
3+
secure: True
4+
root-keys:
5+
3e0cce471cf09815f930210f7827266fd09045445d65923e6d0238a6cd15126f
6+
443abb7fb497a134c343faf52f0b659bd7999bc06b7f63fa76dc99d631f9bea1
7+
a86a1f6ce86c449c46666bda44268677abf29b5b2d2eb5ec7af903ec2f117a82
8+
bcec67e8e99cabfa7764d75ad9b158d72bfacf70ca1d0ec8bc6b4406d1bf8413
9+
c00aae8461a256275598500ea0e187588c35a5d5d7454fb57eac18d9edb86a56
10+
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee
11+
12+
113
packages:
214
./
315
./hie-compat
@@ -35,7 +47,16 @@ packages:
3547
./plugins/hls-refactor-plugin
3648
./plugins/hls-overloaded-record-dot-plugin
3749

38-
index-state: 2023-11-13T12:07:58Z
50+
-- See CONTRIBUTING for some Nix commands you will need to run if you
51+
-- update either of these.
52+
index-state:
53+
-- Bump both the following dates if you need newer packages from Hackage
54+
-- , hackage.haskell.org 2024-07-04T12:01:48Z
55+
, hackage.haskell.org 2023-11-13T12:07:58Z
56+
-- , hackage.haskell.org 2024-06-05T00:00:00Z
57+
58+
-- Bump this if you need newer packages from CHaP
59+
, cardano-haskell-packages 2024-06-29T00:00:00Z
3960

4061
tests: True
4162
test-show-details: direct
@@ -49,14 +70,23 @@ write-ghc-environment-files: never
4970
package *
5071
ghc-options: -haddock
5172

73+
source-repository-package
74+
type: git
75+
location: https://github.com/input-output-hk/plu-stan
76+
--branch: chore/without-custom-extension
77+
tag: edb7dd577d863d21b0228b246aa44ccde510ca85
78+
79+
80+
81+
5282
constraints:
5383
-- C++ is hard to distribute, especially on older GHCs
5484
-- See https://github.com/haskell/haskell-language-server/issues/3822
5585
text -simdutf,
5686
ghc-check -ghc-check-use-package-abis,
5787
ghc-lib-parser-ex -auto,
58-
-- This is only present in some versions, and it's on by default since
59-
-- 0.14.5.0, but there are some versions we allow that need this
88+
-- This is only present in some versions, and it's on by default since
89+
-- 0.14.5.0, but there are some versions we allow that need this
6090
-- setting
6191
stylish-haskell +ghc-lib,
6292
-- Centos 7 comes with an old gcc version that doesn't know about
@@ -79,8 +109,8 @@ source-repository-package
79109
-- END DELETE
80110

81111
if impl(ghc >= 9.1)
82-
-- ekg packagess are old and unmaintained, but we
83-
-- don't rely on them for the mainline build, so
112+
-- ekg packagess are old and unmaintained, but we
113+
-- don't rely on them for the mainline build, so
84114
-- this is okay
85115
allow-newer:
86116
ekg-json:base,

plugins/hls-stan-plugin/src/Ide/Plugin/Stan.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ import Stan.Core.Id (Id (..))
4141
import Stan.Inspection (Inspection (..))
4242
import Stan.Inspection.All (inspectionsIds, inspectionsMap)
4343
import Stan.Observation (Observation (..))
44+
import Stan (createCabalExtensionsMap,
45+
getStanConfig,removeOffchain)
46+
import Debug.Trace (traceShow, trace, traceShowM)
4447

4548
descriptor :: Recorder (WithPriority Log) -> PluginId -> PluginDescriptor IdeState
4649
descriptor recorder plId = (defaultPluginDescriptor plId)
@@ -77,7 +80,8 @@ rules recorder plId = do
7780
Just hie -> do
7881
let enabledInspections = HM.fromList [(LSP.fromNormalizedFilePath file, inspectionsIds)]
7982
-- This should use Cabal config for extensions and Stan config for inspection preferences is the future
80-
let analysis = runAnalysis Map.empty enabledInspections [] [hie]
83+
let analysis' = runAnalysis Map.empty enabledInspections [] [hie]
84+
analysis <- liftIO $ removeOffchain [hie] analysis'
8185
return (analysisToDiagnostics file analysis, Just ())
8286
else return ([], Nothing)
8387

0 commit comments

Comments
 (0)