overture icon indicating copy to clipboard operation
overture copied to clipboard

Is not yet specified package and utils

Open lausdahl opened this issue 7 years ago • 8 comments

Would it be possible to change the Delegate loading from using no package to a package like org.overture.lib or search default first and then this package?

There are some utility methods like stringOf(Value val) that I keep repeating in different places because I cannot refer IO since it has no package.

The method is also not exposed but thats not a problem to fix if the class just had a package.

I think that leaving these classes without a package isn't the best approach in the first place and I dont think that we would change any backwards compatibility if we just search both for a match.

lausdahl avatar Feb 20 '18 19:02 lausdahl

Yes, I like that idea. We would really need to run it past the Language Board, but it is a sensible addition rather than a change.

nickbattle avatar Feb 20 '18 22:02 nickbattle

@nickbattle why do we need to run it past the LB? The way I understand this, it's just an internal change in the Delegate class, isn't it?

peterwvj avatar Feb 21 '18 15:02 peterwvj

Well yes, but if we want all future native libs to be in a particular Java package structure, that would have to be added to the packaging guidelines?

nickbattle avatar Feb 21 '18 15:02 nickbattle

Ah yes, I see.

peterwvj avatar Feb 22 '18 07:02 peterwvj

Okay so it is implemented. Can we close this issue, or do we need to add something on the Language Board library submission workflow page?

peterwvj avatar Mar 07 '18 10:03 peterwvj

Or perhaps update the LRM or guides, if they talk about the package structure for native library loading?

nickbattle avatar Mar 07 '18 14:03 nickbattle

I can't find anything in the LRM, but there's a related section in the Overture user manual: 16.2 Defining Your Own Java Libraries to be used from Overture. This section describes the naming convention used for packages (>>The Java delegate, if present, has the same name as the VDM module/class name with underscores ("_") replaced with package naming dots (".").<<. We could add an extra paragraph in this section that describes the new loading strategy.

What do you think?

peterwvj avatar Mar 12 '18 08:03 peterwvj

This needs raising with the LB (next year!).

nickbattle avatar Dec 17 '19 09:12 nickbattle