wiki:MPFramworkGSocWk

Version 4 (modified by armahg@…, 16 years ago) (diff)

--

This page will be used to keep track of progress made on the MacPorts.Framework GSoC project. It can be viewed as a blog of sorts.

Week 1

  • I spent most of this week with family so didn't get to do too much. Most of my time was spent on reading the current Framework code.
  • I made sure that commit access was working ok. There were a few initial problems with that.
  • I managed to get the current MP.Framework to compile on my mac.
  • There were some problems getting the current OCUnit tests for MPInterpreter to compile. My mentor suspects that it has something to do with the "thread protection" code that is part of the method being tested. We'll be looking more into figuring that out but won't spend too much time on it. Ping me for more details.

Week 2 & 3

These past two weeks were spent:

  • Writing a MacPortsFrameworkTester GUI because I hadn't figured out how to get Unit tests working yet and wanted to start some preliminary testing.
  • After some help from Chris Hanson (Hanson's Unit Testing Posts) and a lot of fuddling, I finally got the Unit tests to work. There were two main issues as far as I could tell:
    1. Setting correct "Compliling Sources" for the Test Bundle: This I think only needs to include the *test.h and *test.m classes i.e. the classes that contain the unit tests. Since we already had a dependency on MacPorts.Framework set in the Test Bundle, we didn't need to include any of its source files in the compile stages for the Test bundle. Doing this led to some really weird behavior. For example, in MPInterpreter.m, asking for the bundle of the class returned the Test bundle instead of the MacPorts.Framework so we couldn't find any resource files etc.
    2. The Bundle Loader settings had been set to $(BUILT_PRODUCTS_DIR)/MacPorts.framework/MacPorts. Changing this setting to blank for all configurations for the Test bundle finally fixed the rest of the problems.
  • I was also at WWDC from June 9 - June 13 and got to have lunch with drernie, wms and some other Apple Engineers, was lots of fun.
  • I am currently working on writing more Tests and merging the current code from my mentor on notifications into my branch. Speaking of notifications, we are currently facing a design issue which I will document below as best as I possibly can, the reason being that we are looking for feedback.

Notifications in MacPorts.Framework
The framework is suppose to be able to notify the system of port activities that it performs. Depending on the print options set by a user (debug, info) etc. various port messages are sent to STDOUT during the execution of a port command. Our current solution to for Notifications involves listening for these messages and posting global/local NSNotifications as they arrive. (See notifications.m in gsoc08-framework/ for some preliminary code by rhwood for this).

Is there a better way to go about doing this? If at all possible, we would like to not have to change code in the current macports1.0/ or ports/ folders. You can ping me on irc (Armahg) or email armahg@… with suggestions or more questions on the "problem".

Back to Armahg's main GSoC page