Skip to content

2.11.x collection documentation fixes#4760

Merged
adriaanm merged 1 commit intoscala:2.11.xfrom
janekdb:2.11.x-collection-documentation-fixes-previously-4651
Nov 12, 2015
Merged

2.11.x collection documentation fixes#4760
adriaanm merged 1 commit intoscala:2.11.xfrom
janekdb:2.11.x-collection-documentation-fixes-previously-4651

Conversation

@janekdb
Copy link
Member

@janekdb janekdb commented Sep 21, 2015

This PR started life as #4651.

The bulk of it was separated out into more focused PRs,
#4765 - ScalaDoc comparison script
#4789 - Parameter and type renaming
#4803 - tparam naming consistency

Original PR comment

Some doc fixes for GenTraversableOnce, methods from aggregate to foreach in alphabetical order.

This covers a-f so far. The rest of the alphabet is pending.

Types of corrections:

 * Rewordings, (hopefully) better explanations
 * Fixing type params and parameter names so doc gets inherited properly
 * Adjusting REPL output to what I get with 2.11
 * Moving documentation up to GenTraversableOnce (e.g. copyToArray
   was defined in GTO, but had no documentation there, only in TraversableLike)
 * Squashing some horizontal whitespace

TODO

  • Confirm build green and spot check changes
  • Take off on-hold

DONE

  • Clone PR locally
  • Create initial as-is PR based on Collection documentation fixes #4651
  • Rebase onto current 2.11.x branch
  • Add @deprecatedName('previousName) where parameter names have changed
  • Confirm build passing
  • Modify parameter names for other find, exists, forall locating offenders with def forall\([^p] etc
  • Split Out: Copy ScalaDoc comparison script to new PR (Script to compare the current scaladoc with the parent commit's doc #4765)
  • Remove diff script (5cf459c)
  • Split Out: Move parameter and type renaming to new PR (Rename forall, exists and find predicate and operator params. #4789)
  • Rebase following merge of Rename forall, exists and find predicate and operator params. #4789
  • Remove commits that added a single new line 1️⃣
  • Migrate tparam name change from Doc fix for GenTraversableOnce.aggregate to Doc fixes for GenTraversableOnce.foreach where all the other tparam name change are to be found.
  • Add de-double-spacing for TreeMap, Iterator, IntMap & LongMap to Doc fixes for GenTraversableOnce.foreach
  • Prefer satisfies in Doc fixes for GenTraversableOnce.find
  • Rename Doc fixes for GenTraversableOnce.foreach to Conform tparam...
  • Move Conform tparam... to first commit
  • Restrict Conform tparam... to tparam changes (and some whitespace edits)
  • Apply { } to () change to tparam commit
  • Create new PR restricted to tparam changes
  • Wait for merge of Conform tparam... (Conform foreach tparam to majority naming convention #4803)
  • Rebase following merge of Conform tparam... (Conform foreach tparam to majority naming convention #4803)
  • Fix build failure: method foreach is defined twice:GenTraversableOnce.scala': def foreach[U](f: A => U): Unit by editing Doc fixes for collection/package
  • Rename Doc fixes for GenTraversableOnce.find to Doc fixes for TraversableLike
  • Squash Doc fixes for GenTraversableOnce.forall into Doc fixes for TraversableLike
  • Squash Doc fixes for GenTraversableOnce.fold, foldLeft and foldRight & Doc fixes for copyToArray in TraversableLike and GenTraversableOnce to Improve collections documentation
  • Squash Doc fixes for TraversableLike into Improve collections documentation
  • Squash Doc fix for GenTraversableOnce.aggregate into Improve collections documentation
  • Do not delete foreach in Doc fixes for collection/package
  • Squash Doc fixes for collection/package into Improve collections documentation
  • Review current changes (continue from AnyRefMap.scala)
  • Address review comments including "So".

1️⃣ This was temporarily added to get past a git rebase --continue problem.

@janekdb janekdb force-pushed the 2.11.x-collection-documentation-fixes-previously-4651 branch from 5cb72a5 to edf72b8 Compare September 21, 2015 21:00
@janekdb janekdb force-pushed the 2.11.x-collection-documentation-fixes-previously-4651 branch from c9762dc to efc7465 Compare September 23, 2015 21:25
@SethTisue SethTisue added this to the 2.11.8 milestone Sep 24, 2015
@janekdb janekdb force-pushed the 2.11.x-collection-documentation-fixes-previously-4651 branch 2 times, most recently from c9dbf06 to 95aa214 Compare October 5, 2015 10:45
@janekdb janekdb changed the title 2.11.x collection documentation fixes (previously pr 4651) 2.11.x collection documentation fixes Oct 5, 2015
janekdb added a commit to janekdb/scala that referenced this pull request Oct 6, 2015
Align parameters names to use p for predicates and op for combining operations.

Based on scala#4760. Extended to include,

 - Tuple2Zipped
 - Tuple3Zipped
 - Either

The original author was vsalvis.
janekdb added a commit to janekdb/scala that referenced this pull request Oct 7, 2015
Align parameters names to use p for predicates and op for combining operations.

Based on scala#4760. Extended to include,

 - Tuple2Zipped
 - Tuple3Zipped
 - Either

The original author was vsalvis.
janekdb added a commit to janekdb/scala that referenced this pull request Oct 9, 2015
Align parameters names to use p for predicates and op for combining operations.

Based on scala#4760. Extended to include,

 - Tuple2Zipped
 - Tuple3Zipped
 - Either

The original author was vsalvis.
@janekdb janekdb force-pushed the 2.11.x-collection-documentation-fixes-previously-4651 branch 4 times, most recently from e61f646 to 34237a6 Compare October 14, 2015 18:51
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer satisfies phrasing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also still prefer satisfies

@janekdb janekdb force-pushed the 2.11.x-collection-documentation-fixes-previously-4651 branch from 34237a6 to c4a3d9e Compare October 14, 2015 19:10
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question about applying this change to two other traits.

TraversableLike could also have this method and documentation deleted. It would inherit the method indirectly from GenTraversableOnce.

TraversableOnce also inherits foreach from GenTraversableOnce so it could be deleted as well.

Would this be safe to do?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're trying to simplify the collections, which may mean that the whole Gen hierarchy goes away (since it is generalizing over serial vs. parallel collections). To prevent extra future work, I wouldn't remove anything from X just because it also is found in GenX.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will restrict the change to removing the duplicated documentation in TraversableLike.

@janekdb janekdb force-pushed the 2.11.x-collection-documentation-fixes-previously-4651 branch from c4a3d9e to e467b75 Compare October 15, 2015 19:41
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting a paragraph with "So" is somewhat inelegant.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@janekdb janekdb force-pushed the 2.11.x-collection-documentation-fixes-previously-4651 branch from e467b75 to 9891468 Compare October 15, 2015 19:57
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From where will these docs come if they're deleted here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation from GenTraversableOnce is used. I have confirmed this by building the docs after adding a some unique text to GenTraversableOnce to be sure of the source.

@janekdb janekdb force-pushed the 2.11.x-collection-documentation-fixes-previously-4651 branch 3 times, most recently from 0f5332e to 93dd8a6 Compare October 16, 2015 10:25
@janekdb janekdb force-pushed the 2.11.x-collection-documentation-fixes-previously-4651 branch from 15f972d to f6d5752 Compare October 18, 2015 19:09
@janekdb
Copy link
Member Author

janekdb commented Oct 19, 2015

/rebuild

@janekdb janekdb force-pushed the 2.11.x-collection-documentation-fixes-previously-4651 branch 6 times, most recently from 2652b0e to 63afdd6 Compare October 23, 2015 20:48
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention JavaConverters.

@janekdb janekdb force-pushed the 2.11.x-collection-documentation-fixes-previously-4651 branch from 63afdd6 to e818e52 Compare October 23, 2015 21:50
@SethTisue
Copy link
Member

@janekdb #4803 is merged now

@janekdb
Copy link
Member Author

janekdb commented Oct 27, 2015

Thanks.

@janekdb janekdb force-pushed the 2.11.x-collection-documentation-fixes-previously-4651 branch from e818e52 to 4830d4d Compare October 27, 2015 13:54
 - Remove some duplicate method documentation that is now inherited
 - Whitespace edits
 - Rewording of method docs
 - Clearer usage examples
 - tparam alignment for some usecase tags
 - Prefer () to { } for do nothing bodies
@janekdb janekdb force-pushed the 2.11.x-collection-documentation-fixes-previously-4651 branch from 4830d4d to e3cbcd5 Compare October 27, 2015 13:56
@janekdb
Copy link
Member Author

janekdb commented Oct 27, 2015

@SethTisue - please take off on-hold.

Review by @heathermiller , @dickwall , @som-snytt , @Ichoran .

@dickwall
Copy link
Contributor

dickwall commented Nov 2, 2015

LGTM - there are a lot of changes here but I spot no mistakes. Will wait for at least one more LGTM (double check) on this latest round of changes before merging. Ping @heathermiller, @som-snytt or @Ichoran

@adriaanm
Copy link
Contributor

@Ichoran, could you take another look?

@soc
Copy link
Contributor

soc commented Nov 12, 2015

Not @Ichoran, but LGTM.

@adriaanm
Copy link
Contributor

Thanks!

adriaanm added a commit that referenced this pull request Nov 12, 2015
…-fixes-previously-4651

2.11.x collection documentation fixes
@adriaanm adriaanm merged commit 2218497 into scala:2.11.x Nov 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants