Re: [racket-dev] [plt] Push #27595: master branch updated

2013-10-16 Thread Matthias Felleisen

+1 

Cabals not withstanding. 


On Oct 16, 2013, at 1:40 AM, Stephen Chang  wrote:

> I just discovered this behavior accidentally.
> 
> It caught me off guard and feels unintuitive. And the negative of 
> accidentally running it doesnt seem to outweigh having to type an extra 
> "--link " (especially after cloning, when you are not in the 
> directory you just created anyways).
> 
> I doubt I'm going to change any minds though so at the very least this 
> behavior should be mentioned in raco pkg install --help.
> 
> 
> On Mon, Oct 14, 2013 at 2:08 PM,  wrote:
> samth has updated `master' from eca9e16b96 to 4a542969c7.
>   http://git.racket-lang.org/plt/eca9e16b96..4a542969c7
> 
> =[ One Commit ]=
> Directory summary:
>   27.7% pkgs/racket-pkgs/racket-doc/pkg/scribblings/
>   54.1% racket/collects/pkg/
>   10.4% racket/collects/racket/
> 
> ~~
> 
> 4a54296 Sam Tobin-Hochstadt  2013-09-26 17:37
> :
> | Make 'raco pkg install' with no arguments install the current directory.
> |
> | This is useful for telling people how to install a new pkg, from
> | GitHub or elsewhere: just get the files, and then do
> | `raco pkg install` in the relevant directory.
> |
> | Also, both cabal (the Haskell package manager) and npm (the node.js
> | package manager) behave this way.
> |
> | To explicitly get the old behavior, specify the sources as
> | `--pkgs pkg-srcs ...`.  This is useful in scripts, when `pkg-srcs`
> | might be empty.
> :
>   M Makefile   |  2 +-
>   M pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl  |  6 ++
>   M racket/collects/pkg/main.rkt   | 15 
> +--
>   M racket/collects/racket/HISTORY.txt |  3 ++-
>   M .../racket-doc/pkg/scribblings/getting-started.scrbl   |  5 ++---
> 
> =[ Overall Diff ]===
> 
> Makefile
> 
> --- OLD/Makefile
> +++ NEW/Makefile
> @@ -199,7 +199,7 @@ RACKET = racket/bin/racket $(USER_CONFIG)
>  RACO = racket/bin/racket $(USER_CONFIG) -N raco -l- raco
>  WIN32_RACKET = racket\racket $(USER_CONFIG)
>  WIN32_RACO = racket\racket $(USER_CONFIG) -N raco -l- raco
> -X_AUTO_OPTIONS = --skip-installed --deps search-auto $(JOB_OPTIONS)
> +X_AUTO_OPTIONS = --skip-installed --deps search-auto --pkgs $(JOB_OPTIONS)
>  USER_AUTO_OPTIONS = --scope user $(X_AUTO_OPTIONS)
>  LOCAL_USER_AUTO = --catalog build/local/catalog $(USER_AUTO_OPTIONS)
>  SOURCE_USER_AUTO_q = --catalog "$(SRC_CATALOG)" $(USER_AUTO_OPTIONS)
> 
> pkgs/racket-pkgs/racket-doc/pkg/scribblings/getting-started.scrbl
> ~
> --- OLD/pkgs/racket-pkgs/racket-doc/pkg/scribblings/getting-started.scrbl
> +++ NEW/pkgs/racket-pkgs/racket-doc/pkg/scribblings/getting-started.scrbl
> @@ -300,10 +300,9 @@ get started.
>  Whether creating a @tech{single-collection package} or a
>  @tech{multi-collection package}, the next step is to link your
>  development directory as a locally installed package. Use
> -@command-ref{install} in the directory where you created the
> -@nonterm{pkg-name} directory:
> +@command-ref{install} in the @nonterm{pkg-name} directory:
> 
> -@commandline{raco pkg install --link @nonterm{pkg-name}}
> +@commandline{raco pkg install}
> 
>  If you use @command-ref{show} at this point, you'll see a line for
>  @nonterm{pkg-name}. The ``Source'' column will show that it's a
> 
> pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
> ~
> --- OLD/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
> +++ NEW/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
> @@ -322,6 +322,9 @@ sub-commands.
>   If a given @nonterm{pkg-source} is ``auto-installed'' (to satisfy some 
> other package's
>   dependency), then it is promoted to explicitly installed.
> 
> + If no @nonterm{pkg-source}s are supplied, the current directory is
> + installed as a link. See the @DFlag{link} flag below for more details.
> +
>   The @exec{install} sub-command accepts
>   the following @nonterm{option}s:
> 
> @@ -377,6 +380,9 @@ sub-commands.
>  of the given directory will not change for each given directory that 
> implements a
>  @tech{multi-collection package}.}
> 
> +  @item{@DFlag{pkgs} --- Disables default installation of the current 
> directory when no @nonterm{pkg-source}s
> +are supplied.}
> +
>@item{@DFlag{copy} --- Disables default handling of directory 
> @tech{package sources} as links,
>  and instead treats them like other sources: package content is 
> copied to install.}
> 
> 
> racket/collects/pkg/main.rkt
> 
> --- OLD/racket/collects/pkg/main.rkt
> +++ NEW/racket/collects/pkg/main.rkt
> @@ -151,6 +151,7 @@
>   #:once-each
>   catalog-flags ...
>   [#:bool skip-installed () ("Sk

Re: [racket-dev] [plt] Push #27595: master branch updated

2013-10-16 Thread Sam Tobin-Hochstadt
On Wed, Oct 16, 2013 at 1:40 AM, Stephen Chang  wrote:
>
>
> It caught me off guard and feels unintuitive. And the negative of
> accidentally running it doesnt seem to outweigh having to type an extra
> "--link " (especially after cloning, when you are not in the
> directory you just created anyways).

Having just spent some time working with some Haskell code and doing
this repeatedly with `cabal`, I'm now even more convinced that it's
the right thing.

> I doubt I'm going to change any minds though so at the very least this
> behavior should be mentioned in raco pkg install --help.

I'll push this soon -- it requires extending `command-line` a bit in a
way that should be generally useful.

Sam
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [plt] Push #27595: master branch updated

2013-10-15 Thread Stephen Chang
I just discovered this behavior accidentally.

It caught me off guard and feels unintuitive. And the negative of
accidentally running it doesnt seem to outweigh having to type an extra
"--link " (especially after cloning, when you are not in the
directory you just created anyways).

I doubt I'm going to change any minds though so at the very least this
behavior should be mentioned in raco pkg install --help.


On Mon, Oct 14, 2013 at 2:08 PM,  wrote:

> samth has updated `master' from eca9e16b96 to 4a542969c7.
>   http://git.racket-lang.org/plt/eca9e16b96..4a542969c7
>
> =[ One Commit ]=
> Directory summary:
>   27.7% pkgs/racket-pkgs/racket-doc/pkg/scribblings/
>   54.1% racket/collects/pkg/
>   10.4% racket/collects/racket/
>
> ~~
>
> 4a54296 Sam Tobin-Hochstadt  2013-09-26 17:37
> :
> | Make 'raco pkg install' with no arguments install the current directory.
> |
> | This is useful for telling people how to install a new pkg, from
> | GitHub or elsewhere: just get the files, and then do
> | `raco pkg install` in the relevant directory.
> |
> | Also, both cabal (the Haskell package manager) and npm (the node.js
> | package manager) behave this way.
> |
> | To explicitly get the old behavior, specify the sources as
> | `--pkgs pkg-srcs ...`.  This is useful in scripts, when `pkg-srcs`
> | might be empty.
> :
>   M Makefile   |  2 +-
>   M pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl  |  6 ++
>   M racket/collects/pkg/main.rkt   | 15
> +--
>   M racket/collects/racket/HISTORY.txt |  3 ++-
>   M .../racket-doc/pkg/scribblings/getting-started.scrbl   |  5 ++---
>
> =[ Overall Diff ]===
>
> Makefile
> 
> --- OLD/Makefile
> +++ NEW/Makefile
> @@ -199,7 +199,7 @@ RACKET = racket/bin/racket $(USER_CONFIG)
>  RACO = racket/bin/racket $(USER_CONFIG) -N raco -l- raco
>  WIN32_RACKET = racket\racket $(USER_CONFIG)
>  WIN32_RACO = racket\racket $(USER_CONFIG) -N raco -l- raco
> -X_AUTO_OPTIONS = --skip-installed --deps search-auto $(JOB_OPTIONS)
> +X_AUTO_OPTIONS = --skip-installed --deps search-auto --pkgs $(JOB_OPTIONS)
>  USER_AUTO_OPTIONS = --scope user $(X_AUTO_OPTIONS)
>  LOCAL_USER_AUTO = --catalog build/local/catalog $(USER_AUTO_OPTIONS)
>  SOURCE_USER_AUTO_q = --catalog "$(SRC_CATALOG)" $(USER_AUTO_OPTIONS)
>
> pkgs/racket-pkgs/racket-doc/pkg/scribblings/getting-started.scrbl
> ~
> --- OLD/pkgs/racket-pkgs/racket-doc/pkg/scribblings/getting-started.scrbl
> +++ NEW/pkgs/racket-pkgs/racket-doc/pkg/scribblings/getting-started.scrbl
> @@ -300,10 +300,9 @@ get started.
>  Whether creating a @tech{single-collection package} or a
>  @tech{multi-collection package}, the next step is to link your
>  development directory as a locally installed package. Use
> -@command-ref{install} in the directory where you created the
> -@nonterm{pkg-name} directory:
> +@command-ref{install} in the @nonterm{pkg-name} directory:
>
> -@commandline{raco pkg install --link @nonterm{pkg-name}}
> +@commandline{raco pkg install}
>
>  If you use @command-ref{show} at this point, you'll see a line for
>  @nonterm{pkg-name}. The ``Source'' column will show that it's a
>
> pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
> ~
> --- OLD/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
> +++ NEW/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
> @@ -322,6 +322,9 @@ sub-commands.
>   If a given @nonterm{pkg-source} is ``auto-installed'' (to satisfy
> some other package's
>   dependency), then it is promoted to explicitly installed.
>
> + If no @nonterm{pkg-source}s are supplied, the current directory is
> + installed as a link. See the @DFlag{link} flag below for more
> details.
> +
>   The @exec{install} sub-command accepts
>   the following @nonterm{option}s:
>
> @@ -377,6 +380,9 @@ sub-commands.
>  of the given directory will not change for each given directory
> that implements a
>  @tech{multi-collection package}.}
>
> +  @item{@DFlag{pkgs} --- Disables default installation of the current
> directory when no @nonterm{pkg-source}s
> +are supplied.}
> +
>@item{@DFlag{copy} --- Disables default handling of directory
> @tech{package sources} as links,
>  and instead treats them like other sources: package content is
> copied to install.}
>
>
> racket/collects/pkg/main.rkt
> 
> --- OLD/racket/collects/pkg/main.rkt
> +++ NEW/racket/collects/pkg/main.rkt
> @@ -151,6 +151,7 @@
>   #:once-each
>   catalog-flags ...
>   [#:bool skip-installed () ("Skip a  if already
> installed")]
> + [#:bool pkgs () ("Install only the specified packages, even
> when none are provide