Re: Opening up Cabal development

2016-07-17 Thread Edward Z. Yang
Yep, of course.  (I sometimes get the feeling that a less good
way people do this is by just not documenting the feature :o)

Excerpts from Paolo G. Giarrusso's message of 2016-07-17 04:27:14 -0700:
> Edward Z. Yang  mit.edu> writes:
> 
> > Excerpts from Herbert Valerio Riedel's message of 2016-07-13 23:40:06 -0700:
> > > I.e. write up a specification/proposal outlining motivation (i.e. what
> > > problem does this solve), specify what the changes are exactly (syntax &
> > > semantics), what the consequences are, and so on.
> > > 
> > > Then we inevitably need some criteria to decide whether a proposal is
> > > accepted and approved for implementation. This could be formally in the
> > > hands of the core library committee together with the Hackage trustees
> > > (since we do have quite some experience with .cabal files and care a lot
> > > about the Hackage ecosystem).
> > 
> > Why can't we release experimental changes to the Cabal specification?
> > Neither setup-depends nor convenience libraries went through any formal
> > proposal mechanism.  If a feature is good people will start using it
> > and we will have to continue supporting it.  If a feature is bad/not
> > useful we can yank it from the next release; anyone using an
> > experimental feature like this isn't trying to maximize their
> > Cabal compatibility anyway.
> 
> Important nitpick: to do that, experimental features should be
> marked as experimental and this policy should be made explicit.
> That'd be kinder to the one user who starts using it without
> realizing.
> 
> I guess that goes without saying (probably in ways I don't
> realize), but hey :-D
> 
___
cabal-devel mailing list
cabal-devel@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel


Re: Opening up Cabal development

2016-07-17 Thread Paolo G . Giarrusso
Edward Z. Yang  mit.edu> writes:

> Excerpts from Herbert Valerio Riedel's message of 2016-07-13 23:40:06 -0700:
> > I.e. write up a specification/proposal outlining motivation (i.e. what
> > problem does this solve), specify what the changes are exactly (syntax &
> > semantics), what the consequences are, and so on.
> > 
> > Then we inevitably need some criteria to decide whether a proposal is
> > accepted and approved for implementation. This could be formally in the
> > hands of the core library committee together with the Hackage trustees
> > (since we do have quite some experience with .cabal files and care a lot
> > about the Hackage ecosystem).
> 
> Why can't we release experimental changes to the Cabal specification?
> Neither setup-depends nor convenience libraries went through any formal
> proposal mechanism.  If a feature is good people will start using it
> and we will have to continue supporting it.  If a feature is bad/not
> useful we can yank it from the next release; anyone using an
> experimental feature like this isn't trying to maximize their
> Cabal compatibility anyway.

Important nitpick: to do that, experimental features should be
marked as experimental and this policy should be made explicit.
That'd be kinder to the one user who starts using it without
realizing.

I guess that goes without saying (probably in ways I don't
realize), but hey :-D

___
cabal-devel mailing list
cabal-devel@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel


Re: Opening up Cabal development

2016-07-14 Thread Edward Z. Yang
Excerpts from Oleg Grenrus's message of 2016-07-14 02:08:54 -0700:
> About convenience libraries I agree even more. We should discussed them more.
> There are questions I’d might to ask, but I guess it too late

It's not too late. They are not in any real release. They can be
removed.

> Or maybe not too late, but for another thread:
> what is convenience library name clashes with the library on package,
> say I define convenience library fancylib-lens, which is on Hackage, but 
> maybe also after I made my package?
> I guess, some shadowing happens? Is there a warning?

Convenience library shadows the one on Hackage.  There's no warning
but it would be easy to add one; however, I don't think there should
be a warning--these names are just lexically scoped.

> But we have quite formal feeling proposals about `provides`,
> and `or-dependencies / multi-way-flag / depends`, and
> formal process would help to get them thru (or say no, with an explanation)

Yes. Especially when there are competing solutions and there
is not an obvious "best one".

> About the original topic, I’d require “ a history of quality contributions”, 
> so something between (2) or (3).
> I don’t like many rules, also making fair but non-abusable ones is difficult, 
> but as we have this conversation,
> the outcome should be well defined (also how we change the rules).
> As with (2) does every accepted PR counts, like single character typo fix in 
> the documentation?
> And I don’t know how to define “quality contribution” :(

In the blog post linked, the suggestion was to apply discretion by
looking at the GitHub profile / erstwhile contribution history.

But yes, I DO think we should accept single character typo fixes!
That's how you get new contributors who help spruce up the
documentation.  We should trust but verify.

> (Maybe I’m just to scared about dramas happened elsewhere)

Too late; there's already drama ;)

> Related to this, a thought I had for some time:
> I’d like to split Cabal and cabal-install repositories.
> 
> Pros:
> - `cabal-install` can be much more liberal in giving out commit bits, as you 
> cannot make too much damage here.
> - we already have `hackage-security` as a dependency between them.
> - the CI setup could be simplified, resulting into
> - their tests could do more things: `Cabal` parses all `Hackage`, changes to 
> `cabal-install` doesn’t need to do it,
>   and vice-versa, fixing ui of cabal-install doesn’t need to do package tests 
> of Cabal.
> - their other processes could be different too.
> 
> Cons: Simultaneous development is almost impossible. And this is almost a 
> show-stopper.
> - `cabal-install` would need to lag one release behind `Cabal` (development 
> agains released `Cabal`).
>   This could work as `Setup.hs` should work to install packages requiring 
> newer Cabal (isn’t it how it works nowadays?).
>   There will be a problem when newer `Cabal` won’t accept build-plan created 
> by solver
>   in older `cabal-install` (proposals mentioned above), but I hope it won’t 
> be a huge issue.
> - To make this work we’d need to release more Cabal major versions,
>   so there aren’t many breaking and intrusive changes accumulating. But 
> that’s good thing, isn’t it?
> 
> Or it could be a quality win to separate them. After all `cabal-install` is 
> not the only consumer of `Cabal`.
> `stack` uses it very limitedly atm though (i.e. to extract dependencies and 
> maybe verify install plan?)
> I don’t know what `ghc-pkg` does.
> 
> IMHO we should develop Cabal-the-library with highest standards (starting 
> with having detailed CHANGELOG) for library development.
> Now we might have been too focused on developing Cabal for cabal-install. 
> Cabal should provide quality plumbing support for “everyone”.
> (if we could start with a clean desk, i’d make Setup.hs and cabal-install 
> commands different, that’s one confusing part).
> 
> The separation into different repositories would make things a bit clearer:
> Cabal-the-library and cabal-install are different things. (For example: 
> cabal-install doesn’t parse *.cabal files).

Currently cabal-install is tightly coupled to Cabal.  I'm all for looser
coupling (e.g.,  https://github.com/haskell/cabal/issues/3549).
Separate repositories force this, but in general looser coupling will
lead to some short term pain.

Edward
___
cabal-devel mailing list
cabal-devel@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel


Re: Opening up Cabal development

2016-07-14 Thread Oleg Grenrus

> On 14 Jul 2016, at 09:54, Edward Z. Yang  wrote:
> 
> Excerpts from Herbert Valerio Riedel's message of 2016-07-13 23:40:06 -0700:
>> I.e. write up a specification/proposal outlining motivation (i.e. what
>> problem does this solve), specify what the changes are exactly (syntax &
>> semantics), what the consequences are, and so on.
>> 
>> Then we inevitably need some criteria to decide whether a proposal is
>> accepted and approved for implementation. This could be formally in the
>> hands of the core library committee together with the Hackage trustees
>> (since we do have quite some experience with .cabal files and care a lot
>> about the Hackage ecosystem).
> 
> Why can't we release experimental changes to the Cabal specification?
> Neither setup-depends nor convenience libraries went through any formal
> proposal mechanism.  If a feature is good people will start using it
> and we will have to continue supporting it.  If a feature is bad/not
> useful we can yank it from the next release; anyone using an
> experimental feature like this isn't trying to maximize their
> Cabal compatibility anyway.  And any change to the format with
> cabal-install can't parse is not going to be supportable via
> custom-setup anyway.

You gave a reason yourself:
- Can we parse all of Hackage?

With my industrial hat on, I don’t like the idea that I might need older Cabal,
to be able to install some package. OTOH new-build could install older Cabal.
So we’d need to maintain older Cabals, to be build able with newer GHCs,
that’s not fun, but not impossible.

I agree, that we could have discussed setup-depends more,
hopefully no-one disagrees about them (and dcoutts took very conservative 
approach there).
Also taking them out of Cabal, doesn’t mean that package becomes unbuildable,
there will be just more luck involved.

About convenience libraries I agree even more. We should discussed them more.
There are questions I’d might to ask, but I guess it too late

Or maybe not too late, but for another thread:
what is convenience library name clashes with the library on package,
say I define convenience library fancylib-lens, which is on Hackage, but maybe 
also after I made my package?
I guess, some shadowing happens? Is there a warning?

But we have quite formal feeling proposals about `provides`,
and `or-dependencies / multi-way-flag / depends`, and
formal process would help to get them thru (or say no, with an explanation)

> 
> So how about this script, which is how web standards work:
> 
>Cabal changes need to be informally proposed and discussed.
>But the advancer can also write a PR and get it merged in
>as an experimental extension, to be trialed for the next
>major release series.  Eventually it gets standardized.
> 
> Edward

About the original topic, I’d require “ a history of quality contributions”, so 
something between (2) or (3).
I don’t like many rules, also making fair but non-abusable ones is difficult, 
but as we have this conversation,
the outcome should be well defined (also how we change the rules).
As with (2) does every accepted PR counts, like single character typo fix in 
the documentation?
And I don’t know how to define “quality contribution” :(

(Maybe I’m just to scared about dramas happened elsewhere)

Related to this, a thought I had for some time:
I’d like to split Cabal and cabal-install repositories.

Pros:
- `cabal-install` can be much more liberal in giving out commit bits, as you 
cannot make too much damage here.
- we already have `hackage-security` as a dependency between them.
- the CI setup could be simplified, resulting into
- their tests could do more things: `Cabal` parses all `Hackage`, changes to 
`cabal-install` doesn’t need to do it,
  and vice-versa, fixing ui of cabal-install doesn’t need to do package tests 
of Cabal.
- their other processes could be different too.

Cons: Simultaneous development is almost impossible. And this is almost a 
show-stopper.
- `cabal-install` would need to lag one release behind `Cabal` (development 
agains released `Cabal`).
  This could work as `Setup.hs` should work to install packages requiring newer 
Cabal (isn’t it how it works nowadays?).
  There will be a problem when newer `Cabal` won’t accept build-plan created by 
solver
  in older `cabal-install` (proposals mentioned above), but I hope it won’t be 
a huge issue.
- To make this work we’d need to release more Cabal major versions,
  so there aren’t many breaking and intrusive changes accumulating. But that’s 
good thing, isn’t it?

Or it could be a quality win to separate them. After all `cabal-install` is not 
the only consumer of `Cabal`.
`stack` uses it very limitedly atm though (i.e. to extract dependencies and 
maybe verify install plan?)
I don’t know what `ghc-pkg` does.

IMHO we should develop Cabal-the-library with highest standards (starting with 
having detailed CHANGELOG) for library development.
Now we might have been too focused on 

Re: Opening up Cabal development

2016-07-14 Thread Edward Z. Yang
Excerpts from Herbert Valerio Riedel's message of 2016-07-13 23:40:06 -0700:
> I.e. write up a specification/proposal outlining motivation (i.e. what
> problem does this solve), specify what the changes are exactly (syntax &
> semantics), what the consequences are, and so on.
> 
> Then we inevitably need some criteria to decide whether a proposal is
> accepted and approved for implementation. This could be formally in the
> hands of the core library committee together with the Hackage trustees
> (since we do have quite some experience with .cabal files and care a lot
> about the Hackage ecosystem).

Why can't we release experimental changes to the Cabal specification?
Neither setup-depends nor convenience libraries went through any formal
proposal mechanism.  If a feature is good people will start using it
and we will have to continue supporting it.  If a feature is bad/not
useful we can yank it from the next release; anyone using an
experimental feature like this isn't trying to maximize their
Cabal compatibility anyway.  And any change to the format with
cabal-install can't parse is not going to be supportable via
custom-setup anyway.

So how about this script, which is how web standards work:

Cabal changes need to be informally proposed and discussed.
But the advancer can also write a PR and get it merged in
as an experimental extension, to be trialed for the next
major release series.  Eventually it gets standardized.

Edward
___
cabal-devel mailing list
cabal-devel@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel


Re: Opening up Cabal development

2016-07-13 Thread Mikhail Glushenkov
On 14 July 2016 at 03:13, Edward Z. Yang  wrote:
>1. Can we parse all of Hackage?
>
>[...]
>
>3. Can we build all Setup.hs scripts on Hackage?  This lets us know
>   which APIs in Cabal matter, and which ones we can change.
>   We'll need to establish base truth for this.

If someone wants to look into this, the following links should be helpful:

https://github.com/commercialhaskell/all-cabal-files
https://github.com/23Skidoo/all-custom-setups
___
cabal-devel mailing list
cabal-devel@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel


Re: Opening up Cabal development

2016-07-13 Thread Gershom B
On July 13, 2016 at 7:32:47 PM, Edward Z. Yang (ezy...@mit.edu) wrote:

The general notion sounds good to me. I’m semi-indifferent between (1)
and (2) though conservatively lean towards the latter.

> - The Travis build must always be green. We should prioritize
> adding more tests for things we care about. Look into regular
> Hackage tests.
> - PR all your changes (so that you can check that Travis is green),
> try to get approval for big changes but BE BOLD.

I’d add

- I don’t break backwards compat for APIs without notice and
discussion, and don’t break backwards compat for any element of cabal
files without lots of discussion.

(and I don’t know what tests would be necessary to help notice this,
but they’d probably be useful!)

—gershom
___
cabal-devel mailing list
cabal-devel@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel


Re: Opening up Cabal development

2016-07-13 Thread Mikhail Glushenkov
Hi,

On 14 July 2016 at 01:32, Edward Z. Yang  wrote:
> Why don't we give them all commit access!  (If we want to do (1) also
> look at the current PR queue.)

Fine with me. I tried something like this on a smaller scale
previously, giving write access to a number of people with a history
of quality contributions.

> If people want, we could also formalize some more rules about the state
> of master, e.g.,
>
> - The Travis build must always be green.  We should prioritize
>   adding more tests for things we care about.  Look into regular
>   Hackage tests.
> - PR all your changes (so that you can check that Travis is green),
>   try to get approval for big changes but BE BOLD.

+1 on having a welcome page for new developers on the wiki.
___
cabal-devel mailing list
cabal-devel@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/cabal-devel