on master help sign in
13 files changed+35−28
since splitsnapshots
unifiedsplit
.github/pull_request_template.md+2 ChangeLog.md+7−2 README.md+1−1 all-builds.nix+1−1 default.nix+1−1 dep/reflex-platform/github.json+4−3 lib/command/src/Obelisk/Command/Preprocessor.hs+3−2 lib/command/src/Obelisk/Command/Run.hs+9−11 lib/snap-extras/src/Obelisk/Snap/Extras.hs+1−1 skeleton/backend/backend.cabal+2−2 skeleton/common/common.cabal+1−1 skeleton/default.nix+1−1 skeleton/frontend/frontend.cabal+2−2
.github/pull_request_template.md+2
@@ -3,6 +3,8 @@
33I have:
44
55 - [ ] Based work on latest `develop` branch
6+ - [ ] Followed the [contribution guide](https://github.com/obsidiansystems/obelisk/blob/develop/CONTRIBUTING.md#submitting-changes)
67 - [ ] Looked for lint in my changes with `hlint .` (lint found code you did not write can be left alone)
78 - [ ] Run the test suite: `$(nix-build -A selftest --no-out-link)`
9+ - [ ] [Updated the changelog](https://github.com/obsidiansystems/obelisk/blob/develop/CONTRIBUTING.md#in-the-changelog)
810 - [ ] (Optional) Run CI tests locally: `nix-build release.nix -A build.x86_64-linux --no-out-link` (or `x86_64-darwin` on macOS)
ChangeLog.md+7−2
@@ -2,11 +2,16 @@
22
33This project's release branch is `master`. This log is written from the perspective of the release branch: when changes hit `master`, they are considered released.
44
5−## Unreleased
5+## v0.9.1.0
66
7+* [#801](https://github.com/obsidiansystems/obelisk/pull/801): Remove errors and warning for local packages without a library component
8+* [#812](https://github.com/obsidiansystems/obelisk/pull/812): Add support for `NoImplicitPrelude` and other extensions disabled via `No`
79* Pinned version bumps:
8− * reflex-platform [0.6.1.0](https://github.com/reflex-frp/reflex-platform/releases/tag/v0.6.1.0)
10+ * reflex-platform [0.7.0.0](https://github.com/reflex-frp/reflex-platform/releases/tag/v0.7.0.0)
911 * hnix 0.8.0
12+* [#787](https://github.com/obsidiansystems/obelisk/pull/787): Set `immutable` cache control directive when serving content-addressed static assets
13+* Use iOS SDK 13.2
14+
1015
1116## v0.9.0.1
1217
README.md+1−1
@@ -221,7 +221,7 @@ Your account must also belong to an Apple Developer Team, if you want to access
2212211. Click accept to authorize on both the computer and the iPhone.
222222
223223##### Xcode
224−Install Xcode 8.2 (contains iOS SDK 10.2) and open it so that it runs its post install tool setup.
224+Install Xcode 11.2 (contains iOS SDK 13.2) and open it so that it runs its post install tool setup.
225225
226226These versions will work out of the box but iOS SDKs prior to 11.3 should also work. You can choose another installed version in `default.nix`
227227
all-builds.nix+1−1
@@ -1,6 +1,6 @@
11{ self-args ? {
22 config.android_sdk.accept_license = true;
3− iosSdkVersion = "10.2";
3+ iosSdkVersion = "13.2";
44 }
55, local-self ? import ./. self-args
66, supportedSystems ? [ builtins.currentSystem ]
default.nix+1−1
@@ -1,6 +1,6 @@
11{ system ? builtins.currentSystem
22, profiling ? false
3−, iosSdkVersion ? "10.2"
3+, iosSdkVersion ? "13.2"
44, config ? {}
55, terms ? { # Accepted terms, conditions, and licenses
66 security.acme.acceptTerms = false;
dep/reflex-platform/github.json+4−3
@@ -1,7 +1,8 @@
11{
22 "owner": "reflex-frp",
33 "repo": "reflex-platform",
4− "branch": "rc/0.6.1.0",
5− "rev": "673c2622b288504bb57006e6b440d5240ce1865c",
6− "sha256": "0ny8dah1s3amvs1h5k8j1zwzmh07a12af833b6g32cxf0qlj3v0l"
4+ "branch": "release/0.7.0.0",
5+ "private": false,
6+ "rev": "27a7851a780ff21472d85f9a02fb84635ef9027a",
7+ "sha256": "1m4zlw91dpjlbdchjyxhvhv3k7lilm0qa17dhhww868xxc27sann"
78}
lib/command/src/Obelisk/Command/Preprocessor.hs+3−2
@@ -47,7 +47,8 @@ applyPackages origPath inPath outPath packagePaths' = do
4747 Left err -> do
4848 hPutStrLn stderr $ "Error: Unable to parse cabal package " <> packagePath <> "; Skipping preprocessor on " <> origPath <> ". Error: " <> show err
4949 pure Nothing
50− Right (_, packageInfo) -> pure $ Just packageInfo
50+ Right (Just (_, packageInfo)) -> pure $ Just packageInfo
51+ Right Nothing -> pure Nothing
5152
5253 writeOutput packageInfo' inPath outPath
5354
@@ -75,7 +76,7 @@ generateHeader origPath packageInfo =
7576 ext -> (TL.fromString (show ext) :)
7677 showExt = \case
7778 EnableExtension ext -> [TL.fromString (show ext)]
78− DisableExtension _ -> []
79+ DisableExtension ext -> ["No" <> TL.fromString (show ext)]
7980 UnknownExtension ext -> [TL.fromString ext]
8081
8182 ghcOptions =
lib/command/src/Obelisk/Command/Run.hs+9−11
@@ -14,7 +14,7 @@ module Obelisk.Command.Run where
1414import Control.Arrow ((&&&))
1515import Control.Exception (Exception, bracket)
1616import Control.Lens (ifor, (.~), (&))
17−import Control.Monad (filterM, unless)
17+import Control.Monad (filterM)
1818import Control.Monad.Except (runExceptT, throwError)
1919import Control.Monad.IO.Class (liftIO)
2020import Control.Monad.Reader (MonadIO)
@@ -304,15 +304,16 @@ parseCabalPackage
304304 -> m (Maybe CabalPackageInfo)
305305parseCabalPackage dir = parseCabalPackage' dir >>= \case
306306 Left err -> Nothing <$ putLog Error err
307− Right (warnings, pkgInfo) -> do
307+ Right (Just (warnings, pkgInfo)) -> do
308308 for_ warnings $ putLog Warning . T.pack . show
309309 pure $ Just pkgInfo
310+ Right Nothing -> pure Nothing
310311
311312-- | Like 'parseCabalPackage' but returns errors and warnings directly so as to avoid 'MonadObelisk'.
312313parseCabalPackage'
313314 :: (MonadIO m)
314315 => FilePath -- ^ Package directory
315− -> m (Either T.Text ([Dist.PWarning], CabalPackageInfo))
316+ -> m (Either T.Text (Maybe ([Dist.PWarning], CabalPackageInfo)))
316317parseCabalPackage' pkg = runExceptT $ do
317318 (cabalContents, packageFile, packageName) <- guessCabalPackageFile pkg >>= \case
318319 Left GuessPackageFileError_NotFound -> throwError $ "No .cabal or package.yaml file found in " <> T.pack pkg
@@ -340,7 +341,7 @@ parseCabalPackage' pkg = runExceptT $ do
340341 case condLibrary <$> result of
341342 Right (Just condLib) -> do
342343 let (_, lib) = simplifyCondTree evalConfVar condLib
343− pure $ (warnings,) $ CabalPackageInfo
344+ pure $ Just $ (warnings,) $ CabalPackageInfo
344345 { _cabalPackageInfo_packageName = T.pack packageName
345346 , _cabalPackageInfo_packageFile = packageFile
346347 , _cabalPackageInfo_packageRoot = takeDirectory packageFile
@@ -354,17 +355,17 @@ parseCabalPackage' pkg = runExceptT $ do
354355 , _cabalPackageInfo_compilerOptions = options $ libBuildInfo lib
355356 , _cabalPackageInfo_cppOptions = cppOptions $ libBuildInfo lib
356357 }
357− Right Nothing -> throwError "Haskell package has no library component"
358+ Right Nothing -> pure Nothing
358359 Left (_, errors) ->
359360 throwError $ T.pack $ "Failed to parse " <> packageFile <> ":\n" <> unlines (map show errors)
360361
361362parsePackagesOrFail :: (MonadObelisk m, Foldable f) => f FilePath -> m (NE.NonEmpty CabalPackageInfo)
362363parsePackagesOrFail dirs' = do
363− (pkgDirErrs, packageInfos') <- fmap partitionEithers $ for dirs $ \dir -> do
364+ packageInfos' <- fmap catMaybes $ for dirs $ \dir -> do
364365 flip fmap (parseCabalPackage dir) $ \case
365366 Just packageInfo
366− | _cabalPackageInfo_buildable packageInfo -> Right packageInfo
367− _ -> Left dir
367+ | _cabalPackageInfo_buildable packageInfo -> Just packageInfo
368+ _ -> Nothing
368369
369370 -- Sort duplicate packages such that we prefer shorter paths, but fall back to alphabetical ordering.
370371 let packagesByName = Map.map (NE.sortBy $ comparing $ \p -> let n = _cabalPackageInfo_packageFile p in (length n, n))
@@ -386,9 +387,6 @@ parsePackagesOrFail dirs' = do
386387 "No valid, buildable packages found" <> (if null dirs then "" else " in " <> intercalate ", " dirs)
387388 Just xs -> pure xs
388389
389− unless (null pkgDirErrs) $
390− putLog Warning $ T.pack $ "Failed to find buildable packages in " <> intercalate ", " pkgDirErrs
391−
392390 pure packageInfos
393391 where
394392 dirs = toList dirs'
lib/snap-extras/src/Obelisk/Snap/Extras.hs+1−1
@@ -17,7 +17,7 @@ import System.Directory
1717-- | Set response header for "permanent" caching
1818cachePermanently :: MonadSnap m => m ()
1919cachePermanently = do
20− modifyResponse $ setHeader "Cache-Control" "public, max-age=315360000"
20+ modifyResponse $ setHeader "Cache-Control" "public, max-age=315360000, immutable"
2121 modifyResponse $ setHeader "Expires" "Tue, 01 Feb 2050 00:00:00 GMT" --TODO: This should be set to "approximately one year from the time the response is sent"
2222
2323-- | Set response header to not cache
skeleton/backend/backend.cabal+2−2
@@ -14,12 +14,12 @@ library
1414 , obelisk-route
1515 exposed-modules:
1616 Backend
17− ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -O
17+ ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -O -fno-show-valid-hole-fits
1818
1919executable backend
2020 main-is: main.hs
2121 hs-source-dirs: src-bin
22− ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -O -threaded
22+ ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -O -threaded -fno-show-valid-hole-fits
2323 if impl(ghcjs)
2424 buildable: False
2525 build-depends: base
skeleton/common/common.cabal+1−1
@@ -12,4 +12,4 @@ library
1212 exposed-modules:
1313 Common.Api
1414 Common.Route
15− ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -O
15+ ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -O -fno-show-valid-hole-fits
skeleton/default.nix+1−1
@@ -1,7 +1,7 @@
11{ system ? builtins.currentSystem
22, obelisk ? import ./.obelisk/impl {
33 inherit system;
4− iosSdkVersion = "10.2";
4+ iosSdkVersion = "13.2";
55
66 # You must accept the Android Software Development Kit License Agreement at
77 # https://developer.android.com/studio/terms in order to build Android apps.
skeleton/frontend/frontend.cabal+2−2
@@ -16,7 +16,7 @@ library
1616 , text
1717 exposed-modules:
1818 Frontend
19− ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -O
19+ ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -O -fno-show-valid-hole-fits
2020
2121executable frontend
2222 main-is: main.hs
@@ -28,7 +28,7 @@ executable frontend
2828 , reflex-dom
2929 , obelisk-generated-static
3030 , frontend
31− ghc-options: -threaded -O -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates
31+ ghc-options: -threaded -O -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -fno-show-valid-hole-fits
3232 if impl(ghcjs)
3333 ghc-options: -dedupe
3434 cpp-options: -DGHCJS_BROWSER