Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
cc1ce861
Commit
cc1ce861
authored
May 12, 2016
by
Mikhail Glushenkov
Browse files
Remove 'upload --check'.
Fixes #1823.
parent
fe0a4aaf
Changes
5
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/Config.hs
View file @
cc1ce861
...
...
@@ -351,7 +351,6 @@ instance Semigroup SavedConfig where
combinedSavedUploadFlags
=
UploadFlags
{
uploadCandidate
=
combine
uploadCandidate
,
uploadCheck
=
combine
uploadCheck
,
uploadDoc
=
combine
uploadDoc
,
uploadUsername
=
combine
uploadUsername
,
uploadPassword
=
combine
uploadPassword
,
...
...
cabal-install/Distribution/Client/Setup.hs
View file @
cc1ce861
...
...
@@ -1428,7 +1428,6 @@ instance Semigroup InstallFlags where
data
UploadFlags
=
UploadFlags
{
uploadCandidate
::
Flag
Bool
,
uploadCheck
::
Flag
Bool
,
uploadDoc
::
Flag
Bool
,
uploadUsername
::
Flag
Username
,
uploadPassword
::
Flag
Password
,
...
...
@@ -1439,7 +1438,6 @@ data UploadFlags = UploadFlags {
defaultUploadFlags
::
UploadFlags
defaultUploadFlags
=
UploadFlags
{
uploadCandidate
=
toFlag
True
,
uploadCheck
=
toFlag
False
,
uploadDoc
=
toFlag
False
,
uploadUsername
=
mempty
,
uploadPassword
=
mempty
,
...
...
@@ -1466,11 +1464,6 @@ uploadCommand = CommandUI {
uploadCandidate
(
\
v
flags
->
flags
{
uploadCandidate
=
v
})
falseArg
,
option
[
'c'
]
[
"check"
]
"Do not upload, just do QA checks."
uploadCheck
(
\
v
flags
->
flags
{
uploadCheck
=
v
})
trueArg
,
option
[
'd'
]
[
"documentation"
]
"Upload documentation instead of a source package. Cannot be used together with --check.
\
\
By default, this uploads documentation for a package candidate. To upload documentation for
\
...
...
cabal-install/Distribution/Client/Upload.hs
View file @
cc1ce861
module
Distribution.Client.Upload
(
check
,
upload
,
uploadDoc
,
report
)
where
module
Distribution.Client.Upload
(
upload
,
uploadDoc
,
report
)
where
import
Distribution.Client.Types
(
Username
(
..
),
Password
(
..
)
,
RemoteRepo
(
..
),
maybeRepoRemote
)
...
...
@@ -15,7 +15,7 @@ import Distribution.Client.Config
import
qualified
Distribution.Client.BuildReports.Anonymous
as
BuildReport
import
qualified
Distribution.Client.BuildReports.Upload
as
BuildReport
import
Network.URI
(
URI
(
uriPath
)
,
parseURI
)
import
Network.URI
(
URI
(
uriPath
))
import
Network.HTTP
(
Header
(
..
),
HeaderName
(
..
))
import
System.IO
(
hFlush
,
stdin
,
stdout
,
hGetEcho
,
hSetEcho
)
...
...
@@ -30,10 +30,6 @@ import Data.Char (isSpace)
type
Auth
=
Maybe
(
String
,
String
)
checkURI
::
URI
Just
checkURI
=
parseURI
$
"http://hackage.haskell.org/cgi-bin/"
++
"hackage-scripts/check-pkg"
stripExtensions
::
[
String
]
->
FilePath
->
Maybe
String
stripExtensions
exts
path
=
foldM
f
path
(
reverse
exts
)
where
...
...
@@ -170,13 +166,6 @@ report verbosity repoCtxt mUsername mPassword = do
(
remoteRepoURI
remoteRepo
)
[(
report'
,
Just
buildLog
)]
return
()
check
::
Verbosity
->
RepoContext
->
[
FilePath
]
->
IO
()
check
verbosity
repoCtxt
paths
=
do
transport
<-
repoContextGetTransport
repoCtxt
forM_
paths
$
\
path
->
do
notice
verbosity
$
"Checking "
++
path
++
"... "
handlePackage
transport
verbosity
checkURI
checkURI
Nothing
False
path
handlePackage
::
HttpTransport
->
Verbosity
->
URI
->
URI
->
Auth
->
Bool
->
FilePath
->
IO
()
handlePackage
transport
verbosity
uri
packageUri
auth
candidate
path
=
...
...
cabal-install/Main.hs
View file @
cc1ce861
...
...
@@ -1054,9 +1054,6 @@ uploadAction uploadFlags extraArgs globalFlags = do
tarfiles
=
extraArgs
when
(
null
tarfiles
&&
not
(
fromFlag
(
uploadDoc
uploadFlags'
)))
$
die
"the 'upload' command expects at least one .tar.gz archive."
when
(
fromFlag
(
uploadCheck
uploadFlags'
)
&&
fromFlag
(
uploadDoc
uploadFlags'
))
$
die
"--check and --doc cannot be used together."
checkTarFiles
extraArgs
maybe_password
<-
case
uploadPasswordCmd
uploadFlags'
...
...
@@ -1065,10 +1062,7 @@ uploadAction uploadFlags extraArgs globalFlags = do
(
simpleProgramInvocation
xs
xss
)
_
->
pure
$
flagToMaybe
$
uploadPassword
uploadFlags'
withRepoContext
verbosity
globalFlags'
$
\
repoContext
->
do
if
fromFlag
(
uploadCheck
uploadFlags'
)
then
do
Upload
.
check
verbosity
repoContext
tarfiles
else
if
fromFlag
(
uploadDoc
uploadFlags'
)
if
fromFlag
(
uploadDoc
uploadFlags'
)
then
do
when
(
length
tarfiles
>
1
)
$
die
$
"the 'upload' command can only upload documentation "
...
...
cabal-install/changelog
View file @
cc1ce861
...
...
@@ -10,6 +10,8 @@
package
on
Hackage
instead
of
uploading
a
candidate
(#
3419
).
*
Added
optional
solver
output
visualisation
support
via
the
tracetree
package
.
Mainly
intended
for
debugging
(#
3410
).
*
Removed
the
'--check'
option
from
'cabal upload'
(#
1823
).
It
was
replaced
by
package
candidates
.
1.24.0.0
Ryan
Thomas
<
ryan
@
ryant
.
org
>
March
2016
*
If
there
are
multiple
remote
repos
,
'cabal update'
now
updates
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment