Re: GSoC Proposal: Rewrite key parts of MacPorts in Python

2020-04-02 Thread Joshua Root
On 2020-4-3 04:52 , Jackson Isaac wrote:
> Hi Ryan,
> 
> Thanks for your valuable insights and I really appreciate the detailed
> feedback. I didn't realize these things before and the efforts that
> went into creating and maintaining such a great project.
> 
> I sincerely apologize to the community and also to the student for my
> ignorance and the fact that I didn't discuss this before in detail on
> the mailing list and understand the implications that it would make
> before putting anything on the ideas page.
> 
> It was a pre-mature action from my side, and my intention was not to
> hurt anyone. This was also a learning for me personally to not put
> things in place without much thought, discussion and understanding.

I would say it's OK for a GSoC project to be completely original and
never discussed before; the problem with this one is just the scope. You
would need to spend the entire summer (if not more) just doing design in
order to do it right, but the primary assessable output of the project
is code. Naturally you need to do some design before you code, and other
tasks like documentation of the code, but you need to write the code.

It's also OK for a GSoC project to have research elements. A successful
project may produce code that never actually gets put into production --
maybe in the course of implementation it becomes clear that the entire
approach is flawed. Learning that is still valuable.

In this particular case, if the student can suggest a subset of the
project with a small enough scope to be completed over the summer, that
will still produce working code, it could be considered. I have no idea
what that would look like, but it may be possible. As Ryan implied, an
important question is "Which parts should be rewritten in Python, and why?"

- Josh


Re: GSoC Proposal: Rewrite key parts of MacPorts in Python

2020-04-02 Thread Jackson Isaac
Hi Ryan,

On Thu, Apr 2, 2020 at 3:44 AM Ryan Schmidt  wrote:
>
> On Apr 1, 2020, at 18:20, Ryan Schmidt wrote:
>
> > On Mar 31, 2020, at 16:14, Alex Ionkov wrote:
> >
> >> I submitted a proposal this year for rewriting parts of MacPorts in 
> >> Python. The eventual goal is to rewrite all of MacPorts in Python to 
> >> increase modularity and make integration of other APIs with MacPorts 
> >> easier.
> >
> > Is this an idea you just came up with or has there been some discussion of 
> > this before? I didn't see this idea on our GSoC page [1] and it comes as a 
> > surprise to me.
> >
> > [1] https://trac.macports.org/wiki/SummerOfCode#Projects
>
> I see now that it is actually on the list, as just a one-line item:
>
> https://trac.macports.org/wiki/SummerOfCode?action=diff=337_version=336
>
> So then my comments are not so much about your proposal, Alex, as it is about 
> the fact that this item got onto the list at all.
>
>
> MacPorts has 18 years worth of Tcl code which not even us long-time MacPorts 
> developers fully understand. It works as is, and in the spirit of not 
> modifying a working system, my inclination would be not to change it. I may 
> not know where everything is or how everything works in MacPorts base, but I 
> know where many things are and how many things work, and I fear that 
> knowledge would be lost if it were rewritten.  Certainly we should fix bugs. 
> Certainly we should make incremental improvements like whatever is necessary 
> to allow us to update to Tcl 8.6 (i.e. fix the "catch" problem). But 
> rewriting MacPorts wholesale in another programming language seems completely 
> infeasible to me.
>
> I'm sure that rewriting MacPorts base would introduce new bugs, and I'm not 
> confident that our existing test suite would be adequate to catch them. In 
> fact, our test suite is written in Tcl, so there's double the possibility of 
> missing bugs: either because the test suite didn't cover a particular 
> scenario or because rewriting the test suite in Python introduced new bugs 
> into it.
>
> It's not just rewriting MacPorts base either. The more than 10,000 portfiles 
> and the portgroups are also written in Tcl. Should they all be rewritten in 
> Python as well? Doing that manually would take colossal effort, and doing it 
> automatically would require writing a fairly full-featured Tcl-to-Python 
> converter. Or if you propose that the portfiles should be kept in Tcl, then 
> that means Python would have to launch Tcl to interpret each portfile, which 
> seems unnecessarily more complex than what we have now. Using yet another 
> programming language in MacPorts makes it that much harder for new developers 
> to get up to speed.
>
> Note that Tcl was deliberately chosen because of its simple syntax. If we 
> convert portfiles to Python, would that make basic everyday usage more 
> verbose and if so do we really want that? As one specific example, setting 
> the name of a port to "foo" is currently as simple as writing:
>
> name foo
>
> If portfiles become Python files, I am guessing that would have to be 
> rewritten as:
>
> name = 'foo'
>
> and that kind of superfluous punctuational verbosity is what the original 
> designers of MacPorts were trying to avoid.
>
> There are also a lot of little utilities in the macports-contrib repository 
> that hook into MacPorts via Tcl. Our buildbot setup uses several more such 
> scripts developed just for that purpose. All of these would then need to be 
> rewritten in Python.
>
> Needless to say, this also requires a thorough understanding of Python, both 
> to perform this massive one-time conversion and then on an ongoing basis by 
> all MacPorts developers and maintainers. Maybe many people are already 
> familiar with Python, but some MacPorts developers like myself are more 
> familiar with Tcl at this point. Perhaps we could all retrain ourselves to 
> learn Python. But I can't help but recall how four years ago we undertook the 
> massive conversion of our source code from Subversion to GitHub, from which I 
> still haven't fully recovered; I still can't contribute to MacPorts as 
> effectively anymore as I did when we used Subversion. I'm probably in the 
> minority there as other developers were already familiar with git at the 
> time, and if everybody else wants MacPorts rewritten in Python and it can be 
> done then I won't stand in the way.
>
> I don't recall any of this discussion occurring on the mailing list before. I 
> usually stay away from Google Summer of Code issues, but I would have hoped 
> that GSoC would be used as an opportunity for us to finally implement changes 
> that we have wanted to do for years but never got around to doing, rather 
> than to propose new projects whose ramifications have never been discussed 
> before.

Thanks for your valuable insights and I really appreciate the detailed
feedback. I didn't realize these things before and the efforts that
went into creating and maintaining 

Re: GSoC Proposal: Rewrite key parts of MacPorts in Python

2020-04-02 Thread Ralph Seichter
* Ryan Schmidt:

> [...] I would have hoped that GSoC would be used as an opportunity for
> us to finally implement changes that we have wanted to do for years
> but never got around to doing, rather than to propose new projects
> whose ramifications have never been discussed before.

Quite so. Not meaning any disrespect to Alex (I have never seen any of
his code), but if the developer team would actually let him have a shot
at rewriting parts of MacPorts in Python, I'd look for ways to sever my
connections with MacPorts. Homebrew seems nice.

My own experience in software development spans more than 35 years, some
of them focused on Python, and think that rewriting significant aspects
of MacPorts in Python is neither desirable nor an achievable goal for a
"summer of code". Proper design alone with all its necessary peer review
stages could take months.

My advice to GSoC participants: Choose a smallish task with clearly
defined goals that can be completed and documented in the alotted time.
Work to meet the highest quality standards, and actually make life a
little better for end users. Don't aim for the stars. MacPorts devs
have spent many, many years on the existing ecosystem, and while there
is of course room for improvement, proposing a rewrite is, as far as I
am personally concerned, a mere demonstration of bravado that does not
inspire confidence in me.

-Ralph


Port ehcache Issue #60219

2020-04-02 Thread SAPTARSHI MUKHERJEE
Hi,

Thanks again for assigning to me the issue #60219 related to port ehcache.
It helped me develop a much better understanding about a few things related
to the portfile and the ports.

I've made the necessary changes that fetches the new jar file
appropriately, checks with updated checksum values correctly, and I've
removed the Kaffe dependency, replacing it with the Java Portgroup. It has
given expected results on testing, however following are few things that
I'd like to know:-

1) Does this port still need to depend on apache-ant? Facing an error in
apache-ant, I've removed the statement, which helped me get rid of the
build-related error. If the apache-ant still needs to be retained, I'll
have to look into it to fix the error that was like *"Command failed : ant
clean dist". *Please tell me if the dependency becomes redundant after
inclusion of Java portgroup or is still important.

2) On running the command "sudo port test", when it enters the testing
phase, it says "*Failed to test ehcache: ehcache has no tests turned on.
see 'test.run' in portfile(7)*". I feel it is not related to the
correctness of the portfile code, but may please guide me in how I can get
rid of this issue and be able to test it successfully. I'm submitting the
main.log for your kind reference.

Thanks for all the assistance till now. I'd be highly grateful at your kind
suggestions w.r.t. the above issues.

With Warmest Regards,
Yours Sincerely,
*Saptarshi Mukherjee,*
*A GSoC 2020 Aspirant.*


main.log
Description: Binary data