Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
ghcup-hs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Haskell
ghcup-hs
Commits
66a62c17
Verified
Commit
66a62c17
authored
3 years ago
by
Julian Ospald
Browse files
Options
Downloads
Patches
Plain Diff
Fix 'ghcup run' for legacy HLS
parent
5186d959
No related branches found
No related tags found
1 merge request
!238
Implement 'ghcup run'
Pipeline
#47436
failed
3 years ago
Stage: checks
Stage: quick-test
Stage: test
Stage: expensive-test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/ghcup/GHCup/OptParse/Run.hs
+17
-2
17 additions, 2 deletions
app/ghcup/GHCup/OptParse/Run.hs
with
17 additions
and
2 deletions
app/ghcup/GHCup/OptParse/Run.hs
+
17
−
2
View file @
66a62c17
...
@@ -15,6 +15,7 @@ import GHCup.Utils.File
...
@@ -15,6 +15,7 @@ import GHCup.Utils.File
import
GHCup.OptParse.Common
import
GHCup.OptParse.Common
import
GHCup.Errors
import
GHCup.Errors
import
GHCup.Types
import
GHCup.Types
import
GHCup.Types.Optics
(
getDirs
)
import
GHCup.Utils.Logger
import
GHCup.Utils.Logger
import
GHCup.Utils.String.QQ
import
GHCup.Utils.String.QQ
...
@@ -309,8 +310,22 @@ run RunOptions{..} runAppState leanAppstate runLogger = do
...
@@ -309,8 +310,22 @@ run RunOptions{..} runAppState leanAppstate runLogger = do
cbin
<-
liftIO
$
canonicalizePath
bin
cbin
<-
liftIO
$
canonicalizePath
bin
lift
$
createLink
(
relativeSymlink
tmp
cbin
)
(
tmp
</>
"stack"
)
lift
$
createLink
(
relativeSymlink
tmp
cbin
)
(
tmp
</>
"stack"
)
HLS
->
do
HLS
->
do
liftE
$
setHLS
(
_tvVersion
v
)
SetHLS_XYZ
(
Just
tmp
)
Dirs
{
..
}
<-
getDirs
liftE
$
setHLS
(
_tvVersion
v
)
SetHLSOnly
(
Just
tmp
)
let
v'
=
_tvVersion
v
legacy
<-
isLegacyHLS
v'
if
legacy
then
do
-- TODO: factor this out
(
Just
hlsWrapper
)
<-
hlsWrapperBinary
v'
cw
<-
liftIO
$
canonicalizePath
(
binDir
</>
hlsWrapper
)
lift
$
createLink
(
relativeSymlink
tmp
cw
)
(
tmp
</>
takeFileName
cw
)
hlsBins
<-
hlsServerBinaries
v'
Nothing
>>=
liftIO
.
traverse
(
canonicalizePath
.
(
binDir
</>
))
forM_
hlsBins
$
\
bin
->
lift
$
createLink
(
relativeSymlink
tmp
bin
)
(
tmp
</>
takeFileName
bin
)
liftE
$
setHLS
(
_tvVersion
v
)
SetHLSOnly
(
Just
tmp
)
else
do
liftE
$
setHLS
(
_tvVersion
v
)
SetHLS_XYZ
(
Just
tmp
)
liftE
$
setHLS
(
_tvVersion
v
)
SetHLSOnly
(
Just
tmp
)
GHCup
->
pure
()
GHCup
->
pure
()
addToPath
path
=
do
addToPath
path
=
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment