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

Build with ghc(js) 9.8.2 + 9.10.1 #1093

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
3 changes: 3 additions & 0 deletions lib/command/src/Obelisk/Command.hs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ thunkConfig = ThunkConfig
thunkUpdateConfig :: Parser ThunkUpdateConfig
thunkUpdateConfig = ThunkUpdateConfig
<$> optional (strOption (long "branch" <> metavar "BRANCH" <> help "Use the given branch when looking for the latest revision"))
#if MIN_VERSION_nix_thunk(0,7,1)
<*> optional (strOption (short 'r' <> long "rev" <> metavar "REVISION" <> help "Update to this specific revision"))
#endif
Comment on lines +239 to +241
Copy link
Collaborator

Choose a reason for hiding this comment

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

I backported for now, but shouldn't we simply be importing all these parsers from nix-thunk?
@ryantrinkle

<*> thunkConfig

thunkPackConfig :: Parser ThunkPackConfig
Expand Down
18 changes: 15 additions & 3 deletions lib/command/src/Obelisk/Command/Deploy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,14 @@ deployInit deployOpts root = do
failWith [i|Deploy directory ${deployDir} should not be the same as project root.|]
thunkPtr <- wrapNixThunkError (readThunk root) >>= \case
Right (ThunkData_Packed _ ptr) -> return ptr
_ -> wrapNixThunkError (getThunkPtr CheckClean_NotIgnored root Nothing)
_ -> wrapNixThunkError $ compat $ getThunkPtr CheckClean_NotIgnored root Nothing
deployInit' thunkPtr deployOpts
where
#if MIN_VERSION_nix_thunk(0,7,1)
compat = fmap $ \(ptr, _isWorktree) -> ptr
#else
compat = id
#endif
Comment on lines 96 to +104
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess we should treat a worktree dir the same as a standalone unpacked dir?
@ryantrinkle


-- | The preamble in 'deployInit' provides deployInit' with a 'ThunkPtr' that it can install in
-- the staging directory.
Expand Down Expand Up @@ -276,8 +282,14 @@ fi

-- | Update the source thunk in the staging directory to the HEAD of the branch.
deployUpdate :: MonadObelisk m => FilePath -> m ()
deployUpdate deployPath = wrapNixThunkError $
updateThunkToLatest (ThunkUpdateConfig Nothing (ThunkConfig Nothing)) (deployPath </> "src")
deployUpdate deployPath = wrapNixThunkError $ updateThunkToLatest cfg (deployPath </> "src")
where
cfg = ThunkUpdateConfig
Nothing
#if MIN_VERSION_nix_thunk(0,7,1)
Nothing
#endif
(ThunkConfig Nothing)

-- | Platforms that we deploy obelisk artefacts to.
data PlatformDeployment = Android | IOS
Expand Down