Users should not care about versions. Internally the version should default to 254.254, that is the highest valid version that can be encoded in QTypeRevision. This makes all revisions of all types available.
The URI is a more complicated issue. We've seen that people frequently struggle with naming their "entry point" module. You cannot give the module the same name as the executable because that will cause name clashes in the file system. Most of the time, however, that "entry point" module is never imported from anywhere. As such, it doesn't really need a name.
As a solution, a missing URI option should create a special module of the same name as the target it's attached to. It would:
- live in the same output directory as the target, avoiding the name clash
- be bundled directly in the RESOURCE_PREFIX, without appending the target path
- never create a plugin
- never be deployed into the import path. Only the resource version of the module would be available at run time.
As such a module could not be imported, it could also not be used in an SDK. Therefore, no sources and no qmltypes files, not even the qmldir would have to be installed. We still want to copy or generate those files into the build directory, so that the -i option to qmllint and qmlcachegen points to a complete module.