Skip to content
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

Update to v0.15.4 #468

Merged
merged 11 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ the most up-to-date version of this file.

## Unreleased

- Update `purescript` to `0.15.4` (@sigma-andex)

Update to GHC 9.2.3 required by Purescript v0.15.4
Remove `barrier` since it is unmaintained and doesn't work with GHC 9.2.3.

## v0.9.2

- Update `purescript` to `0.15.2` (@JordanMartinez)
Expand Down
1 change: 0 additions & 1 deletion config/routes
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/packages/#PathPackageName/#PathVersion/docs PackageVersionDocsR GET
/packages/#PathPackageName/#PathVersion/docs/#Text PackageVersionModuleDocsR GET
!/packages/#PathPackageName/docs/#Text PackageModuleDocsR GET
!/packages/#PathPackageName/badge PackageBadgeR GET
Copy link
Member

@purefunctor purefunctor Aug 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not actually sure we can drop badge support altogether. If I recall correctly, most of the packages within core make use of this for their READMEs. If we need to fork barrier to work with 9.2.3 then I could probably pick up that task.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it just needs its upper bound updated: purefunctor/barrier@79e8fc3

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, yeah that sounds doable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like Phil did the same thing a few years ago: philopon/barrier#4

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I guess we can try open a PR and see if we get a response

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it to extra-deps, but I can't get it to build.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking into it...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think I need to relax the bounds for bytestring in barrier: purefunctor/barrier@db5e27c

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to @i-am-the-slime I got the stack build working as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@purefunctor if you move it to purescript-contrib I can update the dependencies. Apart fromt his I think it is good to go now

!/packages/#PathPackageName/available-versions PackageAvailableVersionsR GET

/builtins/docs/#Text BuiltinDocsR GET
Expand Down
10 changes: 4 additions & 6 deletions pursuit.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: pursuit
version: 0.9.2
version: 0.9.3
cabal-version: >= 1.8
build-type: Simple
license: MIT
Expand All @@ -26,7 +26,6 @@ library
Handler.Common
Handler.Database
Handler.Help
Handler.PackageBadges
Handler.Packages
Handler.Search
Handler.Utils
Expand Down Expand Up @@ -76,7 +75,7 @@ library
, classy-prelude >= 0.10.2
, classy-prelude-conduit >= 0.10.2
, classy-prelude-yesod >= 0.10.2
, bytestring
, bytestring >= 0.11.3.1
, bytestring-trie
, text
, template-haskell
Expand All @@ -102,7 +101,7 @@ library
, containers
, vector
, time
, purescript == 0.15.2
, purescript == 0.15.4
, bower-json
, blaze-builder
, blaze-markup
Expand All @@ -125,7 +124,6 @@ library
, transformers
, cookie
, xss-sanitize
, barrier
, mono-traversable
, streaming-commons

Expand All @@ -140,7 +138,7 @@ executable pursuit
hs-source-dirs: app
build-depends: base, pursuit

ghc-options: -threaded -O2 -rtsopts -with-rtsopts=-N
ghc-options: -threaded -O2 -rtsopts -with-rtsopts=-N -Wunused-packages

test-suite test
type: exitcode-stdio-1.0
Expand Down
1 change: 0 additions & 1 deletion src/Application.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import Handler.Common
import Handler.Database
import Handler.Packages
import Handler.Search
import Handler.PackageBadges
import Handler.Help
import SearchIndex (emptySearchIndex, createSearchIndex, evalSearchIndex)

Expand Down
3 changes: 2 additions & 1 deletion src/GithubAPI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Import
import Text.Blaze.Html (preEscapedToHtml)
import qualified Data.ByteString.Lazy as BL
import qualified Data.Aeson as A
import qualified Data.Aeson.KeyMap as KM
import qualified Data.HashMap.Strict as HashMap
import qualified Data.CaseInsensitive as CI
import Text.HTML.SanitizeXSS (sanitize)
Expand Down Expand Up @@ -93,7 +94,7 @@ getUser token =
loginFromJSON val =
case val of
A.Object obj ->
case HashMap.lookup "login" obj of
case KM.lookup "login" obj of
Just (A.String t) -> Just t
_ -> Nothing
_ -> Nothing
Expand Down
1 change: 0 additions & 1 deletion src/Handler/Caching.hs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ clearCache pkgName version = do
eachRouteDir
[ PackageVersionR pkgName' (PathVersion version)
, PackageAvailableVersionsR pkgName'
, PackageBadgeR pkgName'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be readded?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

]
removeDirectoryRecursive

Expand Down
36 changes: 0 additions & 36 deletions src/Handler/PackageBadges.hs

This file was deleted.

4 changes: 2 additions & 2 deletions src/Handler/Packages.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import qualified Data.Text.Lazy as TL
import Language.PureScript.CoreFn.FromJSON (parseVersion')
import qualified Language.PureScript.Docs as D
import Web.Bower.PackageMeta (PackageName, runPackageName, bowerDependencies, bowerLicense)
import qualified Data.HashMap.Strict as HashMap
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.KeyMap as KM
import qualified Data.Aeson.BetterErrors as ABE
import qualified Language.PureScript as P

Expand Down Expand Up @@ -262,7 +262,7 @@ displayJsonError value e = case e of
-- with.
extractVersion =
toObject
>=> HashMap.lookup "compilerVersion"
>=> KM.lookup "compilerVersion"
>=> toString
>=> (parseVersion' . unpack)

Expand Down
4 changes: 2 additions & 2 deletions src/SearchIndex.hs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ extractChildDeclarationType declTitle declInfo cdeclInfo =

where
parentName :: P.Qualified (P.ProperName a)
parentName = P.Qualified Nothing (P.ProperName declTitle)
parentName = P.Qualified (P.ByNullSourcePos) (P.ProperName declTitle)
sigma-andex marked this conversation as resolved.
Show resolved Hide resolved

addConstraint constraint =
P.quantify . P.moveQuantifiersToFront . P.ConstrainedType () constraint
Expand Down Expand Up @@ -467,7 +467,7 @@ typeComplexity (P.ParensInType _ t) = typeComplexity t
typeComplexity _ = 0

compareQual :: Eq a => P.Qualified a -> P.Qualified a -> Bool
compareQual (P.Qualified (Just mn1) a1) (P.Qualified (Just mn2) a2) = mn1 == mn2 && a1 == a2
compareQual (P.Qualified (P.ByModuleName mn1) a1) (P.Qualified (P.ByModuleName mn2) a2) = mn1 == mn2 && a1 == a2
compareQual (P.Qualified _ a1) (P.Qualified _ a2) = a1 == a2

runParser :: CST.Parser a -> Text -> Maybe a
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extra-deps:
- bytestring-trie-0.2.5.0
- classy-prelude-yesod-1.5.0
- language-javascript-0.7.0.0
- purescript-0.15.2
- purescript-0.15.4
- monoidal-containers-0.6.2.0
- process-1.6.13.1
- Cabal-3.2.1.0
Expand Down
8 changes: 4 additions & 4 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ packages:
original:
hackage: language-javascript-0.7.0.0
- completed:
hackage: purescript-0.15.0@sha256:901d26379aa58203103244fe190e840babcff60fc712b595ae8cc80978ffb35c,20095
hackage: purescript-0.15.4@sha256:29fcb37f227a475a4357de52962f3564da6c881c146a679a514086d9883b1599,20642
pantry-tree:
size: 145589
sha256: ba91174893b844de7093ddf71e815003c52b85b7ffe9dd289b4d35ddbb585a60
size: 151335
sha256: 6432cafb3d7b3334654d3e5c584eeada632e4c767403ede43953f2d3f33aa8ee
original:
hackage: purescript-0.15.0
hackage: purescript-0.15.4
- completed:
hackage: monoidal-containers-0.6.2.0@sha256:124941d70df5e2928b4c6db605a1d0464e68c2c6b02e426db24a40194d43821d,2219
pantry-tree:
Expand Down