Skip to content

[DON'T MERGE] chore: switch from stan to plu-stan #1

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

Draft
wants to merge 1 commit into
base: fake/2.5.0.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 35 additions & 5 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
repository cardano-haskell-packages
url: https://chap.intersectmbo.org/
secure: True
root-keys:
3e0cce471cf09815f930210f7827266fd09045445d65923e6d0238a6cd15126f
443abb7fb497a134c343faf52f0b659bd7999bc06b7f63fa76dc99d631f9bea1
a86a1f6ce86c449c46666bda44268677abf29b5b2d2eb5ec7af903ec2f117a82
bcec67e8e99cabfa7764d75ad9b158d72bfacf70ca1d0ec8bc6b4406d1bf8413
c00aae8461a256275598500ea0e187588c35a5d5d7454fb57eac18d9edb86a56
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee


packages:
./
./hie-compat
Expand Down Expand Up @@ -35,7 +47,16 @@ packages:
./plugins/hls-refactor-plugin
./plugins/hls-overloaded-record-dot-plugin

index-state: 2023-11-13T12:07:58Z
-- See CONTRIBUTING for some Nix commands you will need to run if you
-- update either of these.
index-state:
-- Bump both the following dates if you need newer packages from Hackage
-- , hackage.haskell.org 2024-07-04T12:01:48Z
, hackage.haskell.org 2023-11-13T12:07:58Z
-- , hackage.haskell.org 2024-06-05T00:00:00Z

-- Bump this if you need newer packages from CHaP
, cardano-haskell-packages 2024-06-29T00:00:00Z

tests: True
test-show-details: direct
Expand All @@ -49,14 +70,23 @@ write-ghc-environment-files: never
package *
ghc-options: -haddock

source-repository-package
type: git
location: https://github.com/input-output-hk/plu-stan
--branch: chore/without-custom-extension
tag: edb7dd577d863d21b0228b246aa44ccde510ca85




constraints:
-- C++ is hard to distribute, especially on older GHCs
-- See https://github.com/haskell/haskell-language-server/issues/3822
text -simdutf,
ghc-check -ghc-check-use-package-abis,
ghc-lib-parser-ex -auto,
-- This is only present in some versions, and it's on by default since
-- 0.14.5.0, but there are some versions we allow that need this
-- This is only present in some versions, and it's on by default since
-- 0.14.5.0, but there are some versions we allow that need this
-- setting
stylish-haskell +ghc-lib,
-- Centos 7 comes with an old gcc version that doesn't know about
Expand All @@ -79,8 +109,8 @@ source-repository-package
-- END DELETE

if impl(ghc >= 9.1)
-- ekg packagess are old and unmaintained, but we
-- don't rely on them for the mainline build, so
-- ekg packagess are old and unmaintained, but we
-- don't rely on them for the mainline build, so
-- this is okay
allow-newer:
ekg-json:base,
Expand Down
6 changes: 5 additions & 1 deletion plugins/hls-stan-plugin/src/Ide/Plugin/Stan.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ import Stan.Core.Id (Id (..))
import Stan.Inspection (Inspection (..))
import Stan.Inspection.All (inspectionsIds, inspectionsMap)
import Stan.Observation (Observation (..))
import Stan (createCabalExtensionsMap,
getStanConfig,removeOffchain)
import Debug.Trace (traceShow, trace, traceShowM)

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

Expand Down
Loading