Warn user if persisted classes are (by mistake) not in the current component

Bug #1561422 reported by Iwan Vosloo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Reahl
Triaged
Wishlist
Unassigned

Bug Description

Certain classes specified in .reahlproject require that they also be part of the egg which the .reahlproject is for. They should not point to classes in other eggs.

For example, in:

   <persisted>
     <class locator="sessionscope:User"/>
     <class locator="sessionscope:LoginSession"/>
   </persisted>

sessionscope must actually be in the current egg which this particular .reahlproject is for.

If you get this wrong, you may get errors later on and these errors do not make evident exactly what is going on.

We can add a check for this to warn explicitly about what the problem is.

Some context:

in ReahlEgg.get_ordered_classes_exported_on and ReahlEgg.get_classes_exported_on can include a check that goes something like this:

entry_points = <do whatever to get the EntryPoint objects without loading them>

and for each one check that:

pkg_resources.resource_exists(self.distribution.as_requirement(), entry_point.module_name+'.py')

Ie, if entry_point's module file does not exist in this egg, we know something is wrong, and can report it as such.

Iwan Vosloo (iv)
Changed in reahl:
status: New → Triaged
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.