nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge: serialization: serialize the Error class and avoid abstract classes with...
[nit.git]
/
src
/
nitserial.nit
diff --git
a/src/nitserial.nit
b/src/nitserial.nit
index
f68982e
..
1c24d69
100644
(file)
--- a/
src/nitserial.nit
+++ b/
src/nitserial.nit
@@
-69,7
+69,7
@@
redef class ToolContext
var opt_dir: OptionString = new OptionString("Output directory", "--dir")
# Depth of the visit and generation
var opt_dir: OptionString = new OptionString("Output directory", "--dir")
# Depth of the visit and generation
- var opt_depth = new OptionEnum(["module", "group", "project"],
+ var opt_depth = new OptionEnum(["module", "group", "package"],
"Depth of the visit and generation", 0, "-d", "--depth")
redef init
"Depth of the visit and generation", 0, "-d", "--depth")
redef init
@@
-93,7
+93,7
@@
end
redef class MClassType
redef fun is_visible_from(mmodule) do
redef class MClassType
redef fun is_visible_from(mmodule) do
- return mmodule.is_visible(mclass.intro_mmodule, public_visibility)
+ return mmodule.is_visible(mclass.intro_mmodule, mclass.visibility)
end
end
end
end
@@
-152,7
+152,7
@@
for mmodule in mmodules do
else if module_path.has_suffix(".nit") then
module_name = module_path.basename(".nit")
else
else if module_path.has_suffix(".nit") then
module_name = module_path.basename(".nit")
else
- module_name = module_path.basename("")
+ module_name = module_path.basename
module_path += ".nit"
end
module_path += ".nit"
end
@@
-160,14
+160,14
@@
for mmodule in mmodules do
var importations = null
var mgroup = mmodule.mgroup
if toolcontext.opt_depth.value == 1 and mgroup != null then
var importations = null
var mgroup = mmodule.mgroup
if toolcontext.opt_depth.value == 1 and mgroup != null then
- modelbuilder.visit_group mgroup
+ modelbuilder.scan_group mgroup
target_modules = mgroup.mmodules
else if toolcontext.opt_depth.value == 2 then
target_modules = mgroup.mmodules
else if toolcontext.opt_depth.value == 2 then
- # project
+ # package
target_modules = new Array[MModule]
importations = new Array[MModule]
if mgroup != null then
target_modules = new Array[MModule]
importations = new Array[MModule]
if mgroup != null then
- for g in mgroup.mproject.mgroups do
+ for g in mgroup.mpackage.mgroups do
target_modules.add_all g.mmodules
end
target_modules.add_all g.mmodules
end
@@
-218,6
+218,7
@@
redef class Deserializer
if mtype isa MGenericType and
mtype.is_subtype(m, null, serializable_type) and
mtype.is_visible_from(mmodule) and
if mtype isa MGenericType and
mtype.is_subtype(m, null, serializable_type) and
mtype.is_visible_from(mmodule) and
+ mtype.mclass.kind == concrete_kind and
not compiled_types.has(mtype) then
compiled_types.add mtype
not compiled_types.has(mtype) then
compiled_types.add mtype