To find the dependent packages or objects related to a package
Below query is used to find the dependencies for an objects or a package
So we can avoid the invalidation of objects before compilation itself.
set pages 2000
(select distinct owner,name,type from dba_dependencies
where referenced_name = UPPER('&1')
and a.type = b.object_type
order by 3