GemTalk / Rowan

a new project/package manager for Smalltalk that supports FileTree and Tonel repositories, and is independent of Monticello and Metacello
MIT License
14 stars 7 forks source link

Contradictory error report #871

Open rjsargent opened 2 years ago

rjsargent commented 2 years ago

a UserDefinedError occurred (error 2318), reason:halt, Component references package(s) that are not defined The following packages are defined, but not referenced in a component: Math-Core-GemStone36--Tests Math-Core-GemStone36-

Component references package(s) that are not defined vs packages are defined, but not referenced in a component

Stack report attached. contradictoryErrorMessage-stack_report.log

dalehenrich commented 2 years ago

From @rjsargent:

I figured it out. The package directories held properties.st files instead of package.st files.

While that may have eliminated the error, I'm not quite sure why that error would be used for empty packages ... so I should get to the bottom of this ... empty packages is a useful clue though ...

rjsargent commented 2 years ago

They weren't empty packages because the directories were not even identified as being package directories since they lacked the necessary package.st file.

That being said, an error that says the components named a package for which no package could be found would be good. The error should distinguish between no such directory exists at all versus the directory exists but is not a package directory.

dalehenrich commented 2 years ago

okay ... I didn't remember the name of the file :smile: ... so yes random directory is even more empty than empty and truly is non-existent ... https://github.com/dalehenrich/RowanCrooked9 is where I put tonel projects with corrupted disk structure (i.e., no way to create using Rowan API) so I plan to create a test case for this puppy and fix the error message ...

Somehow RwAbstractResolvedProjectV2) >> _validate: got the idea that those two packages "existed" and that is the likely source of the issue odd error message ... a test case and a little coding (when I have the time) should clear this up ..

rjsargent commented 2 years ago

_validate: got the idea that those two packages "existed" The components provided the names during the visit to identify everything that should be loaded (considered?). The load step did not find a directory with the correct package.st content.

Part of my confusion arose because there are multiple checks, yet the error presents as if there is only one problem.

Suggestion: change the error reporting to look more like the following.

a UserDefinedError occurred (error 2318), reason:halt, Package validation error(s) found.
Component references package(s) that are not defined
    platform/gs3.6-
        Math-Core-GemStone36-
    tests/platform/gs3.6-
        Math-Core-GemStone36--Tests
The following packages are defined, but not referenced in a component:
    Math-Core-GemStone36--Tests
    Math-Core-GemStone36-

The phrasing of "The following packages are defined, but not referenced in a component:" also needs improvement. I'm not sure what it was really testing, so I don't know what it should say instead. I believe the validation did not find a corresponding directory which actually defined the package.