Developer mode

Ryan Schmidt ryandesign at macports.org
Tue Nov 19 17:19:26 UTC 2019



> On Nov 18, 2019, at 14:32, Ralph Seichter wrote:

> * Ryan Schmidt:
> 
>> I wonder if we should add a "developer mode" to MacPorts -- something
>> that developers could enable in macports.conf.
> 
> I for one would like to be able to peek into what is happening under the
> hood when working with Portfiles, so increased logging of technical
> details sounds useful to me.

We do already have debug mode (the -d flag), but unfortunately it is *very* verbose.

> That includes deprecation warnings,
> suggested update paths, etc.

And debug mode does not include this information. But if we added a developer mode, and started adding such developer-mode-level logging, surely we would also include it in debug-level logging.


We might also add a way for a developer to indicate for which ports developer mode should be turned on. A developer might wish, for example, to be notified of issues relating to the ports they maintain but not the ports that others maintain.


>> In "developer mode", "port lint" or other checks could be run as part
>> of every install.
> 
> Gentoo Linux provides a tool called 'repoman' [1] that is similar to
> 'port lint' in some aspects. It also provides convenience functions like
> updating manifests (mostly source tarball checksums) and a wrapper for
> VCS commits that pre-populates commit messages with the ebuild name
> (similar to Port name), sign-off lines, and links to referenced/closed
> issues in Gentoo's Bugzilla. I find repoman to be very useful, and if
> the developer mode you suggested comes with similar utility, I would
> welcome it.
> 
> [1] https://wiki.gentoo.org/wiki/Repoman

I'm not familiar with Gentoo Linux or Repoman and was not suggesting the introduction of any new programs or port subcommands. I was just suggesting that MacPorts should add a new logging level, which developers might opt in to having displayed on the terminal automatically, and where we could begin to add logging messages that would be helpful to developers to keep their ports up to date with our current best practices.

Not being familiar with it, I'm not sure if what repoman does is applicable to MacPorts. You mentioned updating manifests. I don't know what a manifest is but MacPorts ports only have a Portfile. We did recently introduce the "port bump" developer command to assist with updating checksums:

https://man.macports.org/port-bump.1.html

We don't have a tool to automate commit messages. We expect developers to write them manually, including referencing any related Trac tickets. I'm not sure I understand how an automated tool could know which ticket(s), if any, a commit is related to. We don't use sign-off lines in commit messages. We do have documentation about how we want commit messages to be written:

https://trac.macports.org/wiki/CommitMessages




More information about the macports-dev mailing list