Re: [Evolution-hackers] Regarding API breakage and lost test cases



On 10/01/2012 09:08 PM, Dan Vrátil wrote:
On Monday 01 of October 2012 20:41:07 Tristan Van Berkom wrote:
Hi,
     It's recently come to my attention that a vast API break[0] has
been introduced in the last (3.6) cycle of EDS.

Unfortunately this also breaks the vast majority of the test cases
in EDS proper as well as the benchmarking tests[1] we've been using
to track EDS performance over releases.

After looking through about 1 year's worth of archives, I was
only able to find a single thread[2] remotely related to this
subject so, I'd like to at least raise the question, What is the
rationale behind this API breakage in the 3.6 release ?

Hi,

check this thread [0], probably what you are looking for.



And more practically speaking, is there any clear migration path
towards the new APIs using the ESourceRegistry ?

[1]


Thanks Dan for your prompt reply yesterday.

Those we're indeed what I was looking for.

I'm still trying to find my footing here, the migration guide
and new documentation on ESourceRegistry don't seem to outline
how a new addressbook is actually created.

i.e. if I wanted to test a specific addressbook backend,
I would need a way to create one and populate it inside some sandbox
directory.

I'm getting as far as:

   // Create scratch source
   e_source_new_with_uid();

   // Add it to the registry
   e_source_registry_new();
   e_source_registry_add_sources();

   // Fetch the new source from the registry (no longer 'scratch')
   e_source_registry_ref_source();

   // Create the book now that we have a valid source (... or so we
   // suspected)
   e_book_new ();

Problems I'm encountering are:

   a.) It seems that e_source_registry_ref_source() only finds the
       newly created source the next time I startup the test app
       (so this may indicate a bug, that the local registry is not
       updated after adding a new source).

   b.) e_book_new() complains that the new source has no backend:

      "e-book.c:2944: cannot get book from factory:
       No backend name in source 'Unnamed'"

I'm sure I've missed something ridiculous here, while observing
the sources e-data-book-factory.c, it seems that if the source
were given an addressbook extension with the intended backend
name... that it would happily go ahead and create a book.

But, while we do have:
   e_source_get_extension() & e_source_has_extension()

I'm not seeing:
   e_source_add_extension()

Nor am I seeing any factory methods from the addressbook for creating an
appropriate ESource derived object with an addressbook extension.

Well, any insight into what detail I'm missing here would be great.

Thanks,
    -Tristan


I'd like to lend a hand in reviving the buried test cases, currently
the trial-and-error approach is rather costly so any advice on the
topic would be greatly appreciated.

That would be great. Matthew will be back next week and will be able to give
you more information then I :)

Cheers,
Dan

[0] https://mail.gnome.org/archives/evolution-hackers/2012-May/msg00055.html
[1] https://live.gnome.org/Evolution/ESourceMigrationGuide


Best,
       -Tristan

[0]
http://git.gnome.org/browse/evolution-data-server/commit/?id=db4474f5463ac3f
1af12e182b20987e65a9b60c5

[1]
http://taschenorakel.de/mathias/2012/06/20/performance-and-memory-usage-of-e
volution-data-server/

[2]
https://mail.gnome.org/archives/evolution-hackers/2011-September/msg00057.ht
ml _______________________________________________
evolution-hackers mailing list
evolution-hackers gnome org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]