Paul Phillips | 1 Jul 2012 02:57

2.9.2 vs. 2.10.0: the commandlinening

This week on "The Things We Diff", scalac 2.9.2 options vs. current trunk.


14a15
>   -feature                   Emit warning and location for usages of features that should be imported explicitly.
18a20
>   -language:<feature>        Enable one or more language features.
25c27
<   -target:<target>           Target platform for object files. (jvm-1.5,msil) default:jvm-1.5
---
>   -target:<target>           Target platform for object files. (jvm-1.5,jvm-1.5-asm,jvm-1.6,jvm-1.7,msil) default:jvm-1.5
47c49
< <phase> means one or a list of:
---
> <phases> means one or a comma-separated list of:
62a65
>   -Xfull-lubs                        Retains pre 2.10 behavior of less aggressive truncation of least upper bounds.
65a69,71
>   -Xlog-free-terms                   Print a message when reification creates a free term.
>   -Xlog-free-types                   Print a message when reification resorts to generating a free type.
>   -Xlog-implicit-conversions         Print a message whenever an implicit conversion is inserted.
66a73,77
>   -Xlog-reflective-calls             Print a message when a reflective method call is generated
>   -Xmacro-fallback-classpath <path>  Classpath to load macros implementations from if they cannot be loaded from library classpath.
>   -Xmacro-primary-classpath <path>   Classpath to load macros implementations from, defaults to compilation classpath (aka "library classpath".
>   -Xmacro-settings:<option>          Custom settings for macros.
>   -Xmain-class <path>                Class for manifest's Main-Class entry (only useful with -d <jar>)
69a81
>   -Xno-patmat-analysis               Don't perform exhaustivity/unreachability analysis. Also, ignore <at> switch annotation.
71a84
>   -Xoldpatmat                        Use the pre-2.10 pattern matcher. Otherwise, the 'virtualizing' pattern matcher is used in 2.10.
77,78c90,91
<   -Xprint:<phase>                Print out program after <phase>.
<   -Xprint-icode                  Log internal icode to *.icode files.
---
>   -Xprint:<phases>                   Print out program after <phases>
>   -Xprint-icode[:phases]             Log internal icode to *.icode files after <phases> (default: icode)
89c102
<   -Xverify                       Verify generic signatures in generated bytecode.
---
>   -Xverify                           Verify generic signatures in generated bytecode (asm backend only.)
97c110
< <phase> means one or a list of:
---
> <phases> means one or a comma-separated list of:
104,105c117,118
<   -Ybrowse:<phase>                    Browse the abstract syntax tree after <phase>.
<   -Ycheck:<phase>                     Check the tree at the end of <phase>.
---
>   -Ybrowse:<phases>                   Browse the abstract syntax tree after <phases>
>   -Ycheck:<phases>                    Check the tree at the end of <phases>
110c123,124
<   -Ydependent-method-types            Allow dependent method types.
---
>   -Ydump-classes <dir>                Dump the generated bytecode to .class files (useful for reflective compilation that utilizes in-memory classloaders).
>   -Yeta-expand-keeps-star             Eta-expand varargs methods to T* rather than Seq[T].  This is a temporary option to ease transition.
113a128,130
>   -Yinline-handlers                   Perform exception handler inlining when possible.
>   -Yinline-warnings                   Emit inlining warnings. (Normally surpressed due to high volume)
>   -Yinvalidate <classpath-entry>      Invalidate classpath entry before run
115c132
<   -Ylog:<phase>                       Log operations during <phase>.
---
>   -Ylog:<phases>                      Log operations during <phases>
116a134,136
>   -Ymacro-debug-lite                  Trace essential macro-related activities.
>   -Ymacro-debug-verbose               Trace all macro-related activities: compilation, generation of synthetics, classloading, expansion, exceptions.
>   -Yno-adapted-args                   Do not adapt an argument list (either by inserting () or creating a tuple) to match the receiver.
119c139,140
<   -Yno-imports                        Compile without any implicit imports.
---
>   -Yno-imports                        Compile without importing scala.*, java.lang.*, or Predef.
>   -Yno-predef                         Compile without importing Predef.
123c144,145
<   -Ypmat-naive                        Desugar matches as naively as possible.
---
>   -Yoverride-objects                  Allow member objects to be overridden.
>   -Yoverride-vars                     Allow vars to be overridden.
129,131d150
<   -Yprofile:<phase>                   (Requires jvm -agentpath to contain yjgpagent) Profile CPU usage of given phases. <phase>.
<   -Yprofile-class <class>             Name of profiler class.
<   -Yprofile-memory                    Profile memory, get heap snapshot after each compiler run (requires yjpagent, see above).
133a153
>   -Yreify-copypaste                   Dump the reified trees in copypasteable representation.
136d155
<   -Yrich-exceptions                   Fancier exceptions.  Set source search path with -Dscala.control.sourcepath
138c157,158
<   -Yshow:<phase>                      (Requires -Xshow-class or -Xshow-object) Show after <phase>.
---
>   -Yshow:<phases>                     (Requires -Xshow-class or -Xshow-object) Show after <phases>
>   -Yshow-symkinds                     Print abbreviated symbol kinds next to symbol names.
140,141c160,163
<   -Yshow-trees                        (Requires -Xprint:) Print detailed ASTs.
<   -Yskip:<phase>                      Skip <phase>.
---
>   -Yshow-trees                        (Requires -Xprint:) Print detailed ASTs in formatted form.
>   -Yshow-trees-compact                (Requires -Xprint:) Print detailed ASTs in compact form.
>   -Yshow-trees-stringified            (Requires -Xprint:) Print stringifications along with detailed ASTs.
>   -Yskip:<phases>                     Skip <phases>
143,144c165,166
<   -Ystop-after:<phase>                Stop after given phase <phase>.
<   -Ystop-before:<phase>               Stop before given phase <phase>.
---
>   -Ystop-after:<phases>               Stop after <phases>
>   -Ystop-before:<phases>              Stop before <phases>
145a168
>   -Ywarn-adapted-args                 Warn if an argument list is modified to match the receiver.
160a184
>   -Yissue-debug                       Print stack traces when a context issues an error.
161a186
>   -Ypos-debug                         Trace position validation.
162a188
>   -Yreify-debug                       Trace reification.

Jason Zaugg | 2 Jul 2012 12:07
Picon
Gravatar

Re: [scala-language] Can composing N (say 20) polymorphic functions take time exponential in N (say 80s) to compile?

[moved to -internals]

On Mon, Jul 2, 2012 at 6:21 AM, Josh Suereth
<joshua.suereth@...> wrote:
> Not quite.  We don't have a plan for when a 2.9.3 would occur yet.  I'll
> take a look at what it's acquired and bring up the idea at our next meeting.

I'd still like to take advantage of tree attachments to get rid of the
subclasses of Apply [1]. They aren't correctly handled during tree
duplication, and using attachments would be much cleaner.

To keep source compatibility for the IDE, we could try to provide
provide extractors in 2.10 to mimic the removed case classes. But if
that didn't work out, we might need to backport a few new methods
(e.g. Apply#isConstructor) to 2.9.3. I believe a similar release of
2.8 was made shortly after 2.9 came out.

-jason

https://github.com/retronym/scala/commit/17d8618

Daniel Sobral | 2 Jul 2012 18:19
Picon
Gravatar

Closing issues

I'm trying to compile a list of tickets closed on HEAD, but the
irregularity of the messages is making that very hard.

Right now, many are closing issues like this:

SI-NNNN Description

Etc...

The problem with that is that sometimes the messages are like this:

      Pending test for SI-5008.
      Pending test for SI-4649.

And, of course, not everyone is following the above style anyway. For example:

    Closes t5399. Review by adriaanm

That's a very recent one, so it's relevant.

Besides tNNNN, there's also #NNNN and issue/NNNN, and full URLs!
Speaking of URLs, here are two different bodies from recent commits:

    adds `narrow` to the reflection API

    as per https://issues.scala-lang.org/browse/SI-5951

and

    TypeTag => AbsTypeTag, ConcreteTypeTag => TypeTag

    This protects everyone from the confusion caused by stuff like this:
    https://issues.scala-lang.org/browse/SI-5884

The first seems to be fixing the issue, the second seems not to be
fixing the issue. If I have to guess as a human, no script in the
world is ever going to tell them apart.

Here are some other formats that are _almost_ easy to retrieve by script:

    Fix SI-5846 and SI-4027.

    Closes SI-4482, SI-4651, SI-3702.

    fix for SI-4935

   Also fixes SI-5967, which shows up during pattern matching.

The first two have multiple issues following the close/fix word. Not
much of a problem, unless people come up with more ways to do the same
thing. The second is more difficult, because the word "fix" happens in
many places, and a "SI-NNNN" later in the same line does not always
mean it is being fixed. I have seen such a case. The last one is not
particularly difficult either, except that all that context around
"fix SI-5967" can be problematic. For instance, it could be "does not
fix SI-5967".

So, if you'd like to be able to extract fixes from git logs, I suggest
"(Fix(es)?|Closes?) SI-NNNN, SI-NNNN..." to be added to a line all by
itself on your commit logs.

If anyone (like Josh) is interested, here's what I'm doing for now:

git log v2.9.2..HEAD  --no-merges -i -E --grep "(^
*SI-[0-9]{2,5})|(close|fix)[a-z]*  *(for  *)?(si-|#|t|issue|http[^
]*\/)[^ 0-9]*[0-9]{2,5}\b" | tr 'A-Z' 'a-z' | sed -nEf filter.sed |
sort -u -n > fixed.txt
git log v2.9.2  --no-merges -i -E --grep "(^
*SI-[0-9]{2,5})|(close|fix)[a-z]*  *(for  *)?(si-|#|t|issue|http[^
]*\/)[^ 0-9]*[0-9]{2,5}\b" | tr 'A-Z' 'a-z' | sed -nEf filter.sed |
sort -u -n > backported.txt
grep -x -f backported.txt -v fixed.txt > newlyfixed.txt

Content of filter.sed:

/^ *si-[0-9]{2,5}/ s/^ *si-([0-9]{2,5}\b).*/\1/p
/close|fix/ {
	s/.*(close|fix)[a-z]* +(for +)?(((si-|#|t|issue|http[^ ]*\/)[^
0-9]*[0-9]{2,5}\b( *, *| *and *)?)+).*/\3/
	Tnomatch
	s/,/ /g
	s/[^ 0-9]//g
	s/^\s+|\s+$//g
	s/\s+/\n/g
	p
	:nomatch
}

Yeah, I know. :-/ And 404 on the result is incorrect (the sole URL
caught incorrectly by this).

--

-- 
Daniel C. Sobral

I travel to the future all the time.

Adriaan Moors | 2 Jul 2012 18:35
Picon
Picon
Favicon

Re: Closing issues

Hi Daniel,


Excellent, thanks for this!

The PRP recommends a uniform title format, and I think we should start enforcing it.


I'd suggest dropping the fixes/closes/... prefix because it's redundant and commit titles must be short.

If a commit merely references a ticket, and not closes it, the commit title should not reference it.


cheers
adriaan

On Mon, Jul 2, 2012 at 6:19 PM, Daniel Sobral <dcsobral-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I'm trying to compile a list of tickets closed on HEAD, but the
irregularity of the messages is making that very hard.

Right now, many are closing issues like this:

SI-NNNN Description

Etc...

The problem with that is that sometimes the messages are like this:

      Pending test for SI-5008.
      Pending test for SI-4649.

And, of course, not everyone is following the above style anyway. For example:

    Closes t5399. Review by adriaanm

That's a very recent one, so it's relevant.

Besides tNNNN, there's also #NNNN and issue/NNNN, and full URLs!
Speaking of URLs, here are two different bodies from recent commits:

    adds `narrow` to the reflection API

    as per https://issues.scala-lang.org/browse/SI-5951

and

    TypeTag => AbsTypeTag, ConcreteTypeTag => TypeTag

    This protects everyone from the confusion caused by stuff like this:
    https://issues.scala-lang.org/browse/SI-5884

The first seems to be fixing the issue, the second seems not to be
fixing the issue. If I have to guess as a human, no script in the
world is ever going to tell them apart.

Here are some other formats that are _almost_ easy to retrieve by script:

    Fix SI-5846 and SI-4027.

    Closes SI-4482, SI-4651, SI-3702.

    fix for SI-4935

   Also fixes SI-5967, which shows up during pattern matching.

The first two have multiple issues following the close/fix word. Not
much of a problem, unless people come up with more ways to do the same
thing. The second is more difficult, because the word "fix" happens in
many places, and a "SI-NNNN" later in the same line does not always
mean it is being fixed. I have seen such a case. The last one is not
particularly difficult either, except that all that context around
"fix SI-5967" can be problematic. For instance, it could be "does not
fix SI-5967".

So, if you'd like to be able to extract fixes from git logs, I suggest
"(Fix(es)?|Closes?) SI-NNNN, SI-NNNN..." to be added to a line all by
itself on your commit logs.

If anyone (like Josh) is interested, here's what I'm doing for now:

git log v2.9.2..HEAD  --no-merges -i -E --grep "(^
*SI-[0-9]{2,5})|(close|fix)[a-z]*  *(for  *)?(si-|#|t|issue|http[^
]*\/)[^ 0-9]*[0-9]{2,5}\b" | tr 'A-Z' 'a-z' | sed -nEf filter.sed |
sort -u -n > fixed.txt
git log v2.9.2  --no-merges -i -E --grep "(^
*SI-[0-9]{2,5})|(close|fix)[a-z]*  *(for  *)?(si-|#|t|issue|http[^
]*\/)[^ 0-9]*[0-9]{2,5}\b" | tr 'A-Z' 'a-z' | sed -nEf filter.sed |
sort -u -n > backported.txt
grep -x -f backported.txt -v fixed.txt > newlyfixed.txt

Content of filter.sed:

/^ *si-[0-9]{2,5}/ s/^ *si-([0-9]{2,5}\b).*/\1/p
/close|fix/ {
        s/.*(close|fix)[a-z]* +(for +)?(((si-|#|t|issue|http[^ ]*\/)[^
0-9]*[0-9]{2,5}\b( *, *| *and *)?)+).*/\3/
        Tnomatch
        s/,/ /g
        s/[^ 0-9]//g
        s/^\s+|\s+$//g
        s/\s+/\n/g
        p
        :nomatch
}

Yeah, I know. :-/ And 404 on the result is incorrect (the sole URL
caught incorrectly by this).

--
Daniel C. Sobral

I travel to the future all the time.

Francois | 2 Jul 2012 18:47
Picon
Gravatar

Re: Closing issues

On 02/07/2012 18:35, Adriaan Moors wrote:
Hi Daniel,

Excellent, thanks for this!

The PRP recommends a uniform title format, and I think we should start enforcing it.


I'd suggest dropping the fixes/closes/... prefix because it's redundant and commit titles must be short.

If a commit merely references a ticket, and not closes it, the commit title should not reference it.




Hello,

Just for reference, and not to interfere in any choice: Redmine use the following convention by default[1], and so they are somehow rather used - at least, by people using Redmine:
  • "refs #4242" or just "#4242" : reference an issue
  • "Closes #4242" or "Fixes #4242" : close the ticket

Thanks,


[1] http://www.redmine.org/projects/redmine/wiki/RedmineSettings#Referencing-issues-in-commit-messages

-- Francois ARMAND http://fanf42.blogspot.com http://www.normation.com
iulian dragos | 2 Jul 2012 20:03
Picon
Gravatar

Re: Closing issues



On Mon, Jul 2, 2012 at 6:47 PM, Francois <fanf42-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
On 02/07/2012 18:35, Adriaan Moors wrote:
Hi Daniel,

Excellent, thanks for this!

The PRP recommends a uniform title format, and I think we should start enforcing it.


I'd suggest dropping the fixes/closes/... prefix because it's redundant and commit titles must be short.

If a commit merely references a ticket, and not closes it, the commit title should not reference it.




Hello,

Just for reference, and not to interfere in any choice: Redmine use the following convention by default[1], and so they are somehow rather used - at least, by people using Redmine:
  • "refs #4242" or just "#4242" : reference an issue
  • "Closes #4242" or "Fixes #4242" : close the ticket
+1, same does Assembla and I think it's what we used to do before moving to Jira.

iulian

 



--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais
Daniel Sobral | 2 Jul 2012 20:08
Picon
Gravatar

Re: Closing issues

The style you recommend is not that easy to filter automatically.
Git's --grep goes over the whole body. Granted, we can then limit
output to the title, which will automatically skip anything else.
Still, any standard is better than no standard.

Now, I'm not asking for any enforcement to be applied. I'm just
calling attention to people that, if they'd like the tickets they
closed to be found by script for any purpose (automatic closing,
statistics, release notes, repo-archeology, etc), they should pay some
attention to how they write their commit messages.

On Mon, Jul 2, 2012 at 1:35 PM, Adriaan Moors <adriaan.moors@...> wrote:
> Hi Daniel,
>
> Excellent, thanks for this!
>
> The PRP recommends a uniform title format, and I think we should start
> enforcing it.
>
> https://github.com/scala/scala/wiki/Pull-Request-Policy
>
> I'd suggest dropping the fixes/closes/... prefix because it's redundant and
> commit titles must be short.
>
> If a commit merely references a ticket, and not closes it, the commit title
> should not reference it.
>
>
> cheers
> adriaan
>
> On Mon, Jul 2, 2012 at 6:19 PM, Daniel Sobral <dcsobral@...> wrote:
>>
>> I'm trying to compile a list of tickets closed on HEAD, but the
>> irregularity of the messages is making that very hard.
>>
>> Right now, many are closing issues like this:
>>
>> SI-NNNN Description
>>
>> Etc...
>>
>> The problem with that is that sometimes the messages are like this:
>>
>>       Pending test for SI-5008.
>>       Pending test for SI-4649.
>>
>> And, of course, not everyone is following the above style anyway. For
>> example:
>>
>>     Closes t5399. Review by adriaanm
>>
>> That's a very recent one, so it's relevant.
>>
>> Besides tNNNN, there's also #NNNN and issue/NNNN, and full URLs!
>> Speaking of URLs, here are two different bodies from recent commits:
>>
>>     adds `narrow` to the reflection API
>>
>>     as per https://issues.scala-lang.org/browse/SI-5951
>>
>> and
>>
>>     TypeTag => AbsTypeTag, ConcreteTypeTag => TypeTag
>>
>>     This protects everyone from the confusion caused by stuff like this:
>>     https://issues.scala-lang.org/browse/SI-5884
>>
>> The first seems to be fixing the issue, the second seems not to be
>> fixing the issue. If I have to guess as a human, no script in the
>> world is ever going to tell them apart.
>>
>> Here are some other formats that are _almost_ easy to retrieve by script:
>>
>>     Fix SI-5846 and SI-4027.
>>
>>     Closes SI-4482, SI-4651, SI-3702.
>>
>>     fix for SI-4935
>>
>>    Also fixes SI-5967, which shows up during pattern matching.
>>
>> The first two have multiple issues following the close/fix word. Not
>> much of a problem, unless people come up with more ways to do the same
>> thing. The second is more difficult, because the word "fix" happens in
>> many places, and a "SI-NNNN" later in the same line does not always
>> mean it is being fixed. I have seen such a case. The last one is not
>> particularly difficult either, except that all that context around
>> "fix SI-5967" can be problematic. For instance, it could be "does not
>> fix SI-5967".
>>
>> So, if you'd like to be able to extract fixes from git logs, I suggest
>> "(Fix(es)?|Closes?) SI-NNNN, SI-NNNN..." to be added to a line all by
>> itself on your commit logs.
>>
>> If anyone (like Josh) is interested, here's what I'm doing for now:
>>
>> git log v2.9.2..HEAD  --no-merges -i -E --grep "(^
>> *SI-[0-9]{2,5})|(close|fix)[a-z]*  *(for  *)?(si-|#|t|issue|http[^
>> ]*\/)[^ 0-9]*[0-9]{2,5}\b" | tr 'A-Z' 'a-z' | sed -nEf filter.sed |
>> sort -u -n > fixed.txt
>> git log v2.9.2  --no-merges -i -E --grep "(^
>> *SI-[0-9]{2,5})|(close|fix)[a-z]*  *(for  *)?(si-|#|t|issue|http[^
>> ]*\/)[^ 0-9]*[0-9]{2,5}\b" | tr 'A-Z' 'a-z' | sed -nEf filter.sed |
>> sort -u -n > backported.txt
>> grep -x -f backported.txt -v fixed.txt > newlyfixed.txt
>>
>> Content of filter.sed:
>>
>> /^ *si-[0-9]{2,5}/ s/^ *si-([0-9]{2,5}\b).*/\1/p
>> /close|fix/ {
>>         s/.*(close|fix)[a-z]* +(for +)?(((si-|#|t|issue|http[^ ]*\/)[^
>> 0-9]*[0-9]{2,5}\b( *, *| *and *)?)+).*/\3/
>>         Tnomatch
>>         s/,/ /g
>>         s/[^ 0-9]//g
>>         s/^\s+|\s+$//g
>>         s/\s+/\n/g
>>         p
>>         :nomatch
>> }
>>
>> Yeah, I know. :-/ And 404 on the result is incorrect (the sole URL
>> caught incorrectly by this).
>>
>> --
>> Daniel C. Sobral
>>
>> I travel to the future all the time.
>
>

--

-- 
Daniel C. Sobral

I travel to the future all the time.

Adriaan Moors | 3 Jul 2012 09:14
Picon
Picon
Favicon

Re: Closing issues



On Mon, Jul 2, 2012 at 8:08 PM, Daniel Sobral <dcsobral-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
The style you recommend is not that easy to filter automatically.
Git's --grep goes over the whole body. Granted, we can then limit
output to the title, which will automatically skip anything else.
Still, any standard is better than no standard.
Tools serve the people, not the other way around. (Modulo pragmatism.)
It can't be too hard to stop looking after the first newline.

The reasoning behind my proposal ("SI-NNNN - short, active description in present tense"),
which, to be explicit, does not require a keyword to close a ticket, but simply that it appears in the title.
  1. Closing is the common reason for referencing a ticket in a commit.
  2. Commit titles are limited to 55 chars (give or take).
  3. I don't like typing (on a keyboard).
  4. You can't misspell what you don't have to type.
To recap:
  • 1 commit = 1 issue 
  • you fixed it? put in the title
  • you just want to reference it? put it in the body
  • (if you want to close multiple tickets in a commit, that's fine: just say `closes SI-NNNN` in the body for the remaining tickets )

 Now, I'm not asking for any enforcement to be applied.
I know. I am, though. I think we severely underestimate the thousands 
of little paper cuts that the lack of standardization inflicts on our productivity.
(Since lack of standardization implies lack of tool support implies even more work implies even more chaos and eventually total anarchy.)
 
martin odersky | 3 Jul 2012 09:29
Picon
Picon
Favicon

Re: Closing issues

Why SI? With trak we always used tXXXX or simply #xxxx. Is SI a universal convention or a Jira one? If the latter let's not use it because we are likely moving off Jira.

Cheers

 - Martin



On Tue, Jul 3, 2012 at 9:14 AM, Adriaan Moors <adriaan.moors-p8DiymsW2f8@public.gmane.org> wrote:


On Mon, Jul 2, 2012 at 8:08 PM, Daniel Sobral <dcsobral-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
The style you recommend is not that easy to filter automatically.
Git's --grep goes over the whole body. Granted, we can then limit
output to the title, which will automatically skip anything else.
Still, any standard is better than no standard.
Tools serve the people, not the other way around. (Modulo pragmatism.)
It can't be too hard to stop looking after the first newline.

The reasoning behind my proposal ("SI-NNNN - short, active description in present tense"),
which, to be explicit, does not require a keyword to close a ticket, but simply that it appears in the title.
  1. Closing is the common reason for referencing a ticket in a commit.
  2. Commit titles are limited to 55 chars (give or take).
  3. I don't like typing (on a keyboard).
  4. You can't misspell what you don't have to type.
To recap:
  • 1 commit = 1 issue 
  • you fixed it? put in the title
  • you just want to reference it? put it in the body
  • (if you want to close multiple tickets in a commit, that's fine: just say `closes SI-NNNN` in the body for the remaining tickets )

 Now, I'm not asking for any enforcement to be applied.
I know. I am, though. I think we severely underestimate the thousands 
of little paper cuts that the lack of standardization inflicts on our productivity.
(Since lack of standardization implies lack of tool support implies even more work implies even more chaos and eventually total anarchy.)
 



--
Martin Odersky
Prof., EPFL and Chairman, Typesafe
PSED, 1015 Lausanne, Switzerland
Tel. EPFL: +41 21 693 6863
Tel. Typesafe: +41 21 691 4967

Adriaan Moors | 3 Jul 2012 09:39
Picon
Picon
Favicon

Re: Closing issues

'SI-' is the prefix we chose for the issues pertaining to Scala proper (and not, for example INFrastructure or other sub-projects).
YouTrack supports the same convention.

I kind of like this naming scheme because it makes your tickets googleable.

That said, the most important thing about the naming convention is that we all agree on it and stick to it.

cheers
adriaan

On Tue, Jul 3, 2012 at 9:29 AM, martin odersky <martin.odersky <at> epfl.ch> wrote:
Why SI? With trak we always used tXXXX or simply #xxxx. Is SI a universal convention or a Jira one? If the latter let's not use it because we are likely moving off Jira.

Cheers

 - Martin




On Tue, Jul 3, 2012 at 9:14 AM, Adriaan Moors <adriaan.moors-p8DiymsW2f8@public.gmane.org> wrote:


On Mon, Jul 2, 2012 at 8:08 PM, Daniel Sobral <dcsobral-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
The style you recommend is not that easy to filter automatically.
Git's --grep goes over the whole body. Granted, we can then limit
output to the title, which will automatically skip anything else.
Still, any standard is better than no standard.
Tools serve the people, not the other way around. (Modulo pragmatism.)
It can't be too hard to stop looking after the first newline.

The reasoning behind my proposal ("SI-NNNN - short, active description in present tense"),
which, to be explicit, does not require a keyword to close a ticket, but simply that it appears in the title.
  1. Closing is the common reason for referencing a ticket in a commit.
  2. Commit titles are limited to 55 chars (give or take).
  3. I don't like typing (on a keyboard).
  4. You can't misspell what you don't have to type.
To recap:
  • 1 commit = 1 issue 
  • you fixed it? put in the title
  • you just want to reference it? put it in the body
  • (if you want to close multiple tickets in a commit, that's fine: just say `closes SI-NNNN` in the body for the remaining tickets )

 Now, I'm not asking for any enforcement to be applied.
I know. I am, though. I think we severely underestimate the thousands 
of little paper cuts that the lack of standardization inflicts on our productivity.
(Since lack of standardization implies lack of tool support implies even more work implies even more chaos and eventually total anarchy.)
 



--
Martin Odersky
Prof., EPFL and Chairman, Typesafe
PSED, 1015 Lausanne, Switzerland
Tel. EPFL: +41 21 693 6863
Tel. Typesafe: +41 21 691 4967



Gmane