Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileTree loading fails if README.md is missing #217

Open
peteruhnak opened this issue Apr 24, 2017 · 3 comments
Open

FileTree loading fails if README.md is missing #217

peteruhnak opened this issue Apr 24, 2017 · 3 comments

Comments

@peteruhnak
Copy link

https://github.com/dalehenrich/filetree/blob/pharo6.0_dev/repository/MonticelloFileTree-Core.package/MCFileTreeStCypressReader.class/instance/addClassAndMethodDefinitionsFromEntry..st#L8

When README.md is missing in the folder, then classComment will stay uninitialized and then will fail when specifying comment

self addClassDefinitionFrom: classPropertiesDict comment: classComment withSqueakLineEndings.

maybe a fix would be to just add to the beginning of the method classComment := '', or changing the retrieval to soemthing like

classComment := entries
	detect: [ :entry | entry name = 'README.md' ]
	ifFound: [ :commentEntry | commentEntry contents ]
	ifNone: [ '' ].
@dalehenrich
Copy link
Owner

... the README.md is required ... the creator of the filetree directory structure is supposed to create it correctly ...

@peteruhnak
Copy link
Author

well one can run into this issue very easily when e.g. a bad code subdirectory is specified in baseline. And considering the error message is withSqueakLineEndings was sent to nil it is not the most obvious thing to fix. I've ran into this maybe five times this year and every time I see it I am confused for a bit.

So alternative to fixing the code could be providing meaningful error message.

@dalehenrich
Copy link
Owner

yeah meaningful error message is the ticket ... THX!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants