add public api markers

Review Request #3442 - Created Feb. 9, 2016 and submitted

Information
Matt Olsen
pants
2710, 2908
Reviewers
pants-reviews
benjyw, jsirois, patricklaw, stuhood, zundel

add public api markers to several modules

  • goals
  • help
  • round_engine
  • fs
  • invalidation

CI green: https://travis-ci.org/pantsbuild/pants/builds/108170980

Issues

  • 23
  • 0
  • 0
  • 23
Description From Last Updated
It doesn't seem like this or any of its methods should be public. This is an implementation detail of the ... Stu Hood Stu Hood
I don't think the constructor should be public here... tasks are provided a fully constructed RoundManager. Stu Hood Stu Hood
This class seems like a run_tracker.py implementation detail, so nothing in it should be public. Stu Hood Stu Hood
ditto runtracker implementation detail. Stu Hood Stu Hood
The constructor for Context shouldn't be public... tasks receive a fully constructed Context (and in tests, they should use the ... Stu Hood Stu Hood
Can't imagine a case where a plugin dev would use this. Stu Hood Stu Hood
This is required for use during task registration, IIRC. Stu Hood Stu Hood
Frequently used during task registration. Stu Hood Stu Hood
Is created by the engine. Stu Hood Stu Hood
Should be called by the engine. Stu Hood Stu Hood
ditto called by engine. Stu Hood Stu Hood
IIRC, this and most of the other methods on here should be accessed via context.log, so not many (none?) of ... Stu Hood Stu Hood
Constructor should not be public. Stu Hood Stu Hood
I'm not sure anything in here should be public... the class is consumed by tasks. Stu Hood Stu Hood
Ditto class internal only. Stu Hood Stu Hood
Ditto class internal only. Stu Hood Stu Hood
This class is internal only. Stu Hood Stu Hood
Everything in this class is private. Stu Hood Stu Hood
A user should not directly construct a VTS Stu Hood Stu Hood
...or a VT Stu Hood Stu Hood
This method is private. Stu Hood Stu Hood
This whole class is private. Stu Hood Stu Hood
This whole class is private, AFAIK. Stu Hood Stu Hood
Matt Olsen
Matt Olsen
Patrick Lawson
Yi Cheng
Matt Olsen
Review request changed

Status: Closed (submitted)

Change Summary:

commit f262a18a80164c7007cce6d2478d4c099a2e41d1

Stu Hood

Sorry for the late review.

Let's be much, much more conservative about these in the future: it's easier to expose something later than it is to unexpose it.

src/python/pants/engine/round_engine.py (Diff revision 1)
 
 
 
 

It doesn't seem like this or any of its methods should be public. This is an implementation detail of the engine.

src/python/pants/engine/round_manager.py (Diff revision 1)
 
 
 
 

I don't think the constructor should be public here... tasks are provided a fully constructed RoundManager.

src/python/pants/engine/round_manager.py (Diff revision 1)
 
 
 

I don't think this is supposed to be public (or, I've never seen it used by a task).

This class seems like a run_tracker.py implementation detail, so nothing in it should be public.

ditto runtracker implementation detail.

src/python/pants/goal/context.py (Diff revision 1)
 
 
 
 

The constructor for Context shouldn't be public... tasks receive a fully constructed Context (and in tests, they should use the test helper methods to get one).

src/python/pants/goal/context.py (Diff revision 1)
 
 
 

unsure if public?

src/python/pants/goal/context.py (Diff revision 1)
 
 
 

Unsure if public?

src/python/pants/goal/context.py (Diff revision 1)
 
 

Probably not public.

src/python/pants/goal/context.py (Diff revision 1)
 
 
 
 
 
 

Heh... it's whacky that this exists.

src/python/pants/goal/error.py (Diff revision 1)
 
 
 

Can't imagine a case where a plugin dev would use this.

src/python/pants/goal/goal.py (Diff revision 1)
 
 

This is required for use during task registration, IIRC.

src/python/pants/goal/goal.py (Diff revision 1)
 
 
 
 
 
 
 
 
 

Frequently used during task registration.

src/python/pants/goal/products.py (Diff revision 1)
 
 
 
 

IIRC, this should not be created by a user.

src/python/pants/goal/run_tracker.py (Diff revision 1)
 
 
 
 

Is created by the engine.

src/python/pants/goal/run_tracker.py (Diff revision 1)
 
 
 

Should be called by the engine.

src/python/pants/goal/run_tracker.py (Diff revision 1)
 
 

ditto called by engine.

src/python/pants/goal/run_tracker.py (Diff revision 1)
 
 
 
 
 
 

IIRC, this and most of the other methods on here should be accessed via context.log, so not many (none?) of them should be public.

src/python/pants/goal/task_registrar.py (Diff revision 1)
 
 

Constructor should not be public.

I'm not sure anything in here should be public... the class is consumed by tasks.

src/python/pants/help/help_formatter.py (Diff revision 1)
 
 
 
 
 
 
 
 
 

Ditto class internal only.

src/python/pants/help/help_info_extracter.py (Diff revision 1)
 
 
 
 

Ditto class internal only.

src/python/pants/help/help_printer.py (Diff revision 1)
 
 
 
 
 
 
 
 
 

Ditto class internal only.

src/python/pants/invalidation/build_invalidator.py (Diff revision 1)
 
 
 
 
 

This class is internal only.

Everything in this class is private.

src/python/pants/invalidation/cache_manager.py (Diff revision 1)
 
 
 
 

A user should not directly construct a VTS

src/python/pants/invalidation/cache_manager.py (Diff revision 1)
 
 
 
 

...or a VT

This method is private.

This whole class is private.

src/python/pants/invalidation/cache_manager.py (Diff revision 1)
 
 
 
 
 
 
 

This whole class is private, AFAIK.

Loading...