Commit Graph

528 Commits

Author SHA1 Message Date
9f8c9c228d
Reduce IS_WINDOWS CPP 2021-10-17 20:57:22 +02:00
ccfaedb7ad
Migrate to aeson-2.0.1.0 2021-10-13 19:47:14 +02:00
c846e52acb
Cleanup during unpack failures as well 2021-10-10 20:48:33 +02:00
c4ab59f7bf
Make sure to always ass GHC env var, fixes #258 2021-10-03 11:38:53 +02:00
3b8f2e8307
Apply patches before bootstrap 2021-09-29 23:08:55 +02:00
0af7aaef3c
Fix `--overwrite-version for ghcup compile ghc
Fixes #253
2021-09-29 22:33:17 +02:00
d2b4eccac2
Honour GHC bootstrap compiler during git clone stages
Fixes #250
2021-09-27 12:51:59 +02:00
c19dd5ee8b
Implement ghcup gc command
Fixes #241
2021-09-25 22:29:02 +02:00
6ae3bfe395
Merge branch 'fix-hls-build' 2021-09-25 19:21:19 +02:00
8e8198546f
Fix HLS rebuilds 2021-09-25 18:25:03 +02:00
9497e310ca
Improve cli interface with partial versions
Fixes #243
2021-09-25 17:13:11 +02:00
041a341879
Merge branch 'issue-242' 2021-09-25 00:19:51 +02:00
15dd810d67
Get rid of concurrent-output
Also improve some NO_COLOR foo.
2021-09-24 23:49:50 +02:00
fa523d590e
Add ListAvailable to ListCriteria 2021-09-24 20:51:29 +02:00
aece305003
Move logger stuff to logger module 2021-09-23 12:53:01 +02:00
ef8da9bcec
Make sure NO_COLOR also applies to logging 2021-09-23 12:16:49 +02:00
d5b41683ca
Improve HLS compile 2021-09-20 22:24:20 +02:00
31a523755f
Remove solus support 2021-09-20 19:42:06 +02:00
f90741f4d3
Implement compiling HLS from source 2021-09-19 22:04:32 +02:00
4767f3db5b
Implement ghcup unset 2021-09-19 14:17:55 +02:00
c431c0ae00
Implement GPG verification wrt #236 2021-09-18 21:51:19 +02:00
6f61b5dbef
Make hlint shut up 2021-09-18 15:47:54 +02:00
c42c4b64f9
Improve logging 2021-09-18 15:46:53 +02:00
d3a36c2c9a
Merge remote-tracking branch 'origin/merge-requests/156' 2021-09-18 15:19:06 +02:00
Emily Pillmore
e8d962ac44 Add language fixes per issue #237 2021-09-17 14:11:00 -06:00
ae2031174e
Improve warnAboutHlsCompatibility 2021-09-14 12:36:14 +02:00
Arjun Kathuria
8fc128e89b move some code around for better consistency 2021-09-12 09:25:09 +05:30
Chris Smith
737f72f90f Lint fix. 2021-09-11 23:35:39 -04:00
Chris Smith
c3aab65521 Rewording 2021-09-11 23:24:21 -04:00
Chris Smith
972474f79a Add version numbers to error message.
Fixes after formatting changes.
2021-09-11 23:17:14 -04:00
bc64d2ade0 Apply 3 suggestion(s) to 1 file(s) 2021-09-12 03:09:36 +00:00
Chris Smith
eddda55fe6 Fix hlint warnings 2021-09-11 19:57:42 -04:00
Chris Smith
13aca91231 Add a warning when the installed HLS and GHC versions are not compatible.
This is triggered when:

1. The user has just set either the GHC or HLS version.
2. There is an HLS version set (so some GHC version is compatible).
3. There is a GHC version.
4. The HLS version doesn't support that GHC version.

Fixes #234
2021-09-11 19:33:27 -04:00
Arjun Kathuria
6011242eae minor cleanup 2021-09-11 23:23:58 +05:30
Arjun Kathuria
cadb5086e1 Implements --force install for GHC 2021-09-11 23:20:06 +05:30
Arjun Kathuria
10a30bbf38 Implements --force install for Stack 2021-09-11 22:04:54 +05:30
Arjun Kathuria
6ac7a75bab Implements --force install for HLS 2021-09-11 22:04:40 +05:30
Arjun Kathuria
d60f58cf43 simplify checkIfToolInstalled for Cabal 2021-09-07 14:22:21 +05:30
Arjun Kathuria
7a6a119829 Patch for MonadLogger deletion since new rebase 2021-09-07 14:21:24 +05:30
Arjun Kathuria
0f98ec6b78 factor out checkIfCabalInstalled to checkIfToolInstalled 2021-09-07 11:24:28 +05:30
Arjun Kathuria
107fed6e60 refactor nested case statements when installing cabal 2021-09-07 11:23:30 +05:30
Arjun Kathuria
59a9a770a5 implements --force option for cabal installs. 2021-09-07 11:23:26 +05:30
787c927de6
Improve logging, fixes #228 2021-09-06 23:01:49 +02:00
db8207f8b9
Fixup 2021-09-04 16:06:33 +02:00
d2346a543a
Fixup 2021-09-04 15:53:29 +02:00
c54dc05d92
Read build.mk from files at build time 2021-09-04 15:09:14 +02:00
9bdf6bde17
Only consider .diff/.patch for patch files wrt #226 2021-09-04 14:25:24 +02:00
bc80b1048f
Fix debug logs 2021-09-03 21:00:39 +02:00
d61981bc1b
Update doc on ghcupURL 2021-09-02 21:27:31 +02:00
d98e54a743
Drop yaml/libyaml 2021-08-30 23:36:11 +02:00
13143b8e4d
Drop monad-logger 2021-08-30 23:36:11 +02:00
a269b60282
Remove extra 2021-08-29 22:37:16 +02:00
430dc2d20b
Remove zip dependency 2021-08-29 20:56:17 +02:00
Jan Hrček
f6b6b36eb7 Apply hlint 3.3.2 suggestions 2021-08-29 17:08:06 +02:00
Jan Hrček
3986677b06 Fix typos and simplify code 2021-08-29 14:50:49 +02:00
e38bd61066
Fixup merge 2021-08-26 20:16:40 +02:00
b086261c3c
Merge remote-tracking branch 'origin/merge-requests/149' 2021-08-26 20:12:19 +02:00
8c098d4e17
Add solus in getLinuxDistro 2021-08-26 20:09:48 +02:00
14fc6b7281
Remove string-interpolate wrt #212 2021-08-25 18:54:58 +02:00
9d6e469f79
Add solus support 2021-08-25 13:51:34 +02:00
f8cfcd4038
Get rid of tar 2021-08-25 11:48:30 +02:00
Arjun Kathuria
df758d828b swap checkFileAlreadyExists with throwIfFileAlreadyExists 2021-08-24 20:39:07 +05:30
bfc50e269c
Show a warning if xattr can't be executed 2021-08-24 15:34:35 +02:00
8247c0b00b
Add more doctests 2021-08-24 10:51:39 +02:00
951e676bee
Fix header reading wrt #213 2021-08-23 23:16:32 +02:00
281f310394
Add some unit tests 2021-08-23 23:16:14 +02:00
Arjun Kathuria
8c486e8d46 Make GHCup isolate installs non-overwriting by default 2021-08-23 20:18:45 +05:30
e9fdc073c6
Fix --flavor 2021-08-11 16:19:52 +02:00
57c791106b
Fixup rest of the PR 2021-08-11 16:19:31 +02:00
fcba151fad
Merge remote-tracking branch 'origin/merge-requests/134' 2021-08-11 14:20:04 +02:00
3b24f503d1
Fixup rest of the PR 2021-08-11 13:54:02 +02:00
bd18fd9aa1
Merge remote-tracking branch 'origin/merge-requests/127' 2021-08-11 12:28:48 +02:00
Arjun Kathuria
c2c5625685 implements checking if file already exists for Cabal installs 2021-08-11 10:33:08 +05:30
Arjun Kathuria
ce6fb0bb1e Adds new Error type FileAlreadyExistsError 2021-08-11 10:28:30 +05:30
Arjun Kathuria
dcfb3afdad Revert "implements isolated install sanity-checking for Cabal installs"
This reverts commit 300cfd3ba6.
2021-08-11 09:46:42 +05:30
Arjun Kathuria
300cfd3ba6 implements isolated install sanity-checking for Cabal installs 2021-08-10 20:14:46 +05:30
Arjun Kathuria
bb430fa0b7 Adds the sanity check function for isolated installs 2021-08-10 20:12:14 +05:30
Arjun Kathuria
80fa7965a4 Adds new Error type IsolatedDirNotEmpty 2021-08-10 20:11:32 +05:30
Arjun Kathuria
d1735bc446 adds toolchainSanityChecks for isolated installs too in installGHCBindist function. 2021-08-10 19:53:41 +05:30
dbf1d6f420
Fix unneeded dist files being installed along with GHC 2021-08-10 15:58:40 +02:00
0a0fbd0cb6
Merge branch 'fix-metadata-download' 2021-08-07 19:26:26 +02:00
6dfc04a9f6
Fix metadata file read in --offline mode 2021-08-07 18:31:41 +02:00
72133d0002
Rather skip copying to cache dir if scheme is file:// 2021-08-07 10:24:08 +02:00
6e07e9e56b
Skip copying metadata if source and destination match 2021-08-07 09:55:45 +02:00
e903aeb555
Skip cached metadata when url starts with file:// 2021-08-07 09:54:26 +02:00
2792f6f4b6
Fix error handling when we can't find a filename 2021-08-06 19:45:59 +02:00
Arjun Kathuria
2c6d0382cf adds isolate install feature to compiled ghc command 2021-08-04 16:08:12 +05:30
Arjun Kathuria
e1bec789b0 updates Bindist functions as per https://gitlab.haskell.org/haskell/ghcup-hs/-/merge_requests/127#note_366702 2021-08-03 18:08:54 +05:30
Arjun Kathuria
5683493cae rename some auxiliary functions to their "unpacked" versions 2021-08-03 18:08:54 +05:30
Arjun Kathuria
ae5e213b59 deletes installStackBinIsolated function 2021-08-03 18:08:54 +05:30
Arjun Kathuria
911089f334 updates usages of new installStackBin across files 2021-08-03 18:08:54 +05:30
Arjun Kathuria
6b89646c1e update installStackBindist to take a "Maybe FilePath" argument for isolated installs 2021-08-03 18:08:54 +05:30
Arjun Kathuria
960d5ce79f deletes installHLSBinIsolated function 2021-08-03 18:08:54 +05:30
Arjun Kathuria
90ed0895d6 updates usages of installHLSBin across files 2021-08-03 18:08:54 +05:30
Arjun Kathuria
7471f4f4dc update installHLSBindist to take a "Maybe FilePath" argument for isolated installs 2021-08-03 18:08:54 +05:30
Arjun Kathuria
781cf8eed5 Delete installCabalBinIsolated function. 2021-08-03 18:08:54 +05:30
Arjun Kathuria
236da31af6 updates usages of new installCabalBindist across files. 2021-08-03 18:08:54 +05:30
Arjun Kathuria
1f760af880 update installCabalBindist to take a "Maybe FilePath" argument for isolated installs 2021-08-03 18:08:54 +05:30
Arjun Kathuria
62d03b776b remove installGHCBinIsolated function. 2021-08-03 18:08:54 +05:30
Arjun Kathuria
37ea18a0d8 updates usages of new installGHCBindist and related installGHCBin 2021-08-03 18:08:54 +05:30
Arjun Kathuria
083dc59a8f update installGhcBindist to take a "Maybe FilePath" to work with isolated installs 2021-08-03 18:08:54 +05:30
Arjun Kathuria
a45d069cad Adds a log to notify where the isolated ghc is being installed by the tool 2021-08-03 18:08:54 +05:30
Arjun Kathuria
fdbcd4fafd Adds isolated installs to Stack install 2021-08-03 18:08:54 +05:30
Arjun Kathuria
f3c1c925ed updates installStack' usage in installStackBindist function 2021-08-03 18:08:54 +05:30
Arjun Kathuria
8f6a7ba39c factor out installStack' function 2021-08-03 18:08:54 +05:30
Arjun Kathuria
f212eb4570 Adds isolated install to HLS installs 2021-08-03 18:08:54 +05:30
Arjun Kathuria
0d118e2fe1 update installHLS' usage in installHLSBindist 2021-08-03 18:08:54 +05:30
Arjun Kathuria
c0f46ef81f Factor out installHLS' 2021-08-03 18:08:54 +05:30
Arjun Kathuria
476513b0a7 Adds isolate install functionality to 'Cabal' tool installs 2021-08-03 18:08:54 +05:30
Arjun Kathuria
9a511669a8 use the new factored out installCabal' in installCabalBindist function 2021-08-03 18:08:54 +05:30
Arjun Kathuria
a16a25a3cd factor out installCabal' from installCabalBindist, to be shared with installCabalBinIsolated function 2021-08-03 18:08:54 +05:30
Arjun Kathuria
8666fcd120 adds rudimentary isolate capability to ghcup install ghc command 2021-08-03 18:08:54 +05:30
vglfr
1cfff674b7
Implement config CLI MVP 2021-08-03 09:09:47 +03:00
53ca60596d
Fix nuclear order 2021-07-29 11:51:47 +02:00
21d30cd8ce
Fix GHCup showing up twice in list 2021-07-28 22:48:28 +02:00
b38a569124
Bump to 0.1.16.1 2021-07-28 22:36:59 +02:00
442ddfd4e4
Bump ghcup metadata, because new GHC versions may have different bin/ layout 2021-07-28 20:08:20 +02:00
5a34191b88
Fix listTools to always show currently installed GHCup 2021-07-27 22:33:35 +02:00
d3e3ebd63f
Merge branch 'fix-ghcToolFiles' 2021-07-26 21:25:00 +02:00
5837e04e6e
Cleanup 2021-07-26 18:13:57 +02:00
2774f026e8
Merge branch 'issue-150' 2021-07-26 17:44:37 +02:00
fdf45e0fe6
Do etags hashing wrt #193 2021-07-25 23:15:59 +02:00
3bdc82c99b
Redo file handling wrt #165 and #187 2021-07-22 17:44:03 +02:00
1c2cf98850
Fix file/dir removal on windows, fixes #165 2021-07-21 20:50:58 +02:00
a4a7f73fb7
Allow to use Hadrian as build system, fixes #35 2021-07-20 23:51:31 +02:00
9e181b8820
Allow passing "flavor" to 'ghcup compile ghc'
Fixes #183
2021-07-20 13:39:39 +02:00
a6108f8319
Fix listVersion wrt #183 2021-07-20 11:54:14 +02:00
4ed72fb517
Preserve mtimes on unpacked GHC tarballs on windows wrt #187 2021-07-19 23:33:01 +02:00
3caf91c640
Fix ensureGlobalTools 2021-07-19 19:08:43 +02:00
eaad2caf25
Add prefetch command 2021-07-19 16:51:40 +02:00
6143cdf2e0
Add --offline switch wrt #186 2021-07-19 13:49:24 +02:00
2c7176d998
Use LabelOptic and add LeanAppState
Wrt #186
2021-07-18 14:39:49 +02:00
42134fd2a5
Fix whereIsTool for cross 2021-07-15 22:38:42 +02:00
bc85a7d9c3
Fix cross installation
See https://gitlab.haskell.org/ghc/ghc/-/issues/14297
2021-07-15 20:32:09 +02:00
f04708e8ae
Speed up 'whereis' subcommand wrt #179 2021-07-15 20:01:00 +02:00
ec98826e6d
Fix installStackBindist 2021-07-12 22:15:45 +02:00
227f3acaa5
Implement 'whereis' subcommand, fixes #173 2021-07-12 17:09:18 +02:00
5cf297a4d2
Clarify stack postinstall message wrt #153 2021-07-11 15:09:16 +02:00
d86f84eef4
Improve logging with newlines 2021-07-11 14:34:05 +02:00
928f4a97de
Fix ghcToolFiles for upcoming GHC build system changes
Also see: https://gitlab.haskell.org/ghc/ghc/-/issues/20074#note_363720
2021-07-10 21:43:37 +02:00
abbe51614d
Improve uninstallation on windows wrt #150 2021-07-07 23:19:50 +02:00
0ad5dc4583
Fix CI 2021-07-03 16:51:58 +02:00
7189998f3b
Cleanup rmGhcupDirs a bit 2021-07-03 11:25:49 +02:00
8e820c6e89
Clean up and fix nuke command 2021-07-03 11:15:37 +02:00
Arjun Kathuria
61019ecd49 Adds reporting remaining leftover files sorted by Depth. 2021-06-29 14:31:13 +05:30
Arjun Kathuria
bed06d1334 make reported leftover file paths absolute 2021-06-29 08:56:57 +05:30
Arjun Kathuria
a3b11f21bb change logWarn to logDebug in "rmghcup / handlePathNotPresent" function 2021-06-28 19:35:48 +05:30
Arjun Kathuria
1dfe5cfecf updates path equating (which may fail) in "rmGhcup" function. 2021-06-28 13:56:20 +05:30
Arjun Kathuria
8e4550657e couple of windows indentation fixes in source files 2021-06-27 00:25:55 +05:30
Arjun Kathuria
aee7fa52c3 warn user if current running ghcup exec is in non-standard location 2021-06-26 23:58:38 +05:30
Arjun Kathuria
d166cc84a1 change type of rmGhcup fn from "Excepts '[NotInstalled] m ()" to m () 2021-06-26 23:26:31 +05:30
Arjun Kathuria
bb7229d224 Adds descriptive comments in rmGhcupDir explaing silent deletions and
leftover reporting.
2021-06-26 22:09:32 +05:30
Arjun Kathuria
708cd5ead9 Fix a minor typo in some conditional windows code. 2021-06-26 21:59:15 +05:30
Arjun Kathuria
395aeb415d change return type of rmGhcupDirs to m [Filepath] from m () 2021-06-26 21:56:07 +05:30
Arjun Kathuria
830fb70492 adds returning left-over files back to Main.hs from rmGhcupDirs 2021-06-26 21:54:42 +05:30
Arjun Kathuria
6379a26afb factor out getDirectoryContentsRecursive function in GHCup.Utils.Prelude 2021-06-26 21:53:14 +05:30
Arjun Kathuria
2277013c76 hide unsupportedOperation error in windows ghcup bin removal in case
of different drives.
2021-06-26 20:05:21 +05:30
Arjun Kathuria
8934e0e6bd Merge branch 'feat-nuke' of gitlab.haskell.org:arjun/ghcup-hs into feat-nuke 2021-06-26 20:00:37 +05:30
Arjun Kathuria
59519febbc handle symlink case when deleting directories in rmGhcupDirs 2021-06-26 19:52:32 +05:30
Arjun Kathuria
46fcdd356c Use rmFile instead of removeFile. 2021-06-26 19:32:53 +05:30
Arjun Kathuria
931904f388 fix minor typo in conditional windows code 2021-06-25 17:00:39 +05:30
Arjun Kathuria
a40d0cbb5c swap out system.Directory.rename for Win32.File.moveFileEx for windows 2021-06-25 16:09:26 +05:30
Arjun Kathuria
9f5df9db10 Adds conditional windows ghcup bin removal code. Todo: test it, add
more exception handling if required.
2021-06-25 15:06:02 +05:30
Arjun Kathuria
d26ddf7015 adds rudimentary ghcup bin removal code. TODO: handle windows. 2021-06-25 13:54:38 +05:30
Arjun Kathuria
9515065407 adds conditional export of useXDG in non-windows OS-es. fix in rmGhcupDirs code that used useXDG 2021-06-24 22:48:38 +05:30
Arjun Kathuria
82a8c61cf6 adds bin dir removal code, checking for XDG 2021-06-24 10:54:38 +05:30
Arjun Kathuria
3fae516ce4 Adds using 'rmFile' fn in rmGhcupDirs, it has better windows handling logic 2021-06-24 10:08:21 +05:30
Arjun Kathuria
33eaa765d7 adds better error handling when removing files and dirs in rmGhcupDirs function 2021-06-23 23:23:54 +05:30
Arjun Kathuria
3b3dde8413 updates deleting dirs in rmGhcupDirs according to feedback on merge request 2021-06-23 10:36:17 +05:30
Arjun Kathuria
118a2744fe adds new getGhcupConfFilePath fn to GHCup.hs, also refactors to use for error handling in missing file cases 2021-06-23 10:10:28 +05:30
Arjun Kathuria
2e3dceecf8 abstracts out getting ghcup conf file path 2021-06-23 10:08:06 +05:30
Arjun Kathuria
8a1dbe9dbb basic implementation of rmGhcupDirs function that removes relevant dirs in NUKE command 2021-06-22 23:14:25 +05:30
Arjun Kathuria
4ef3622616 Adds argument de-structuring to 'rmTool' function & remove the one in its body 2021-06-22 20:09:35 +05:30
Arjun Kathuria
0b959c56fb change rmTool type to Excepts '[NotInstalled ] m () 2021-06-22 18:44:30 +05:30
Arjun Kathuria
ec29332657 Adds basic implementation of rmTool function 2021-06-22 14:29:26 +05:30
41783ff027
Fix ghcup upgrade if binary is in non-standard location 2021-06-13 15:08:31 +02:00
b56c44a210
Ensure directories 2021-06-13 13:41:06 +02:00
ef0c94fddd
Fix windows upgrade for good 2021-06-13 10:15:34 +02:00
b40cefee35
Fix 'ghcup upgrade' on windows 2021-06-13 07:51:54 +02:00
581108ab65
Fix compliation from git 2021-06-12 22:27:56 +02:00
54e8e3efb0
Gracefully handle stack binary not installed by ghcup 2021-06-12 22:27:31 +02:00
4dcc63606e
Remove legacy handling of cabal binary 2021-06-12 22:26:50 +02:00
ac21c19b7e
Remove unnecessary micro version stripping
Since we can specify version bounds now, this is unnecessary.
2021-06-11 11:26:44 +02:00
27510b3b51
Allow setting GHCUP_INSTALL_BASE_PREFIX on windows 2021-06-08 18:08:06 +02:00
aa992c0e5d
PrettyShow 2021-06-07 20:09:18 +02:00
443522d526
Improve windows bootstrapping and make msys2 configurable 2021-06-07 19:33:12 +02:00
9f92e0bc86
Fix #136 2021-06-05 22:26:35 +02:00
2f62067d96
Windows support 2021-06-05 21:01:01 +02:00
734916728c
Add stack support 2021-05-15 14:01:00 +02:00
5a86a28d67
Smarter logging 2021-04-29 14:47:30 +02:00
a905c6322c
Fix spelling 2021-04-29 14:47:22 +02:00
49ccadd470
Warn when overwriting current GHC due to compile 2021-04-29 14:46:45 +02:00
9f0ac0ee19
Allow to compile from git repo 2021-04-28 21:17:57 +02:00
1e9ee260e7
Raise minSpace to 5GB 2021-04-25 21:32:58 +02:00
0b7d447aaf
Satisfy hlint 2021-04-25 18:00:32 +02:00
16a9336d31
Fix missing pretty instance 2021-04-25 17:59:15 +02:00
7d13836fea
Warn when /tmp doesn't have 2500 or more of disk space 2021-04-25 17:25:40 +02:00
b645c4d57e
Add date to GHC bindist names created by ghcup 2021-04-24 21:51:43 +02:00
0c6699c3c6
Allow to check ghcup binaries in validate-tarballs 2021-04-11 22:15:43 +02:00
adf44ba141
Validate subdirs too, fixes #52 2021-04-02 16:54:27 +02:00