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

.properties is missing in Tonel-based repository #277

Closed
marceltaeumel opened this issue Jul 24, 2020 · 3 comments · Fixed by #282
Closed

.properties is missing in Tonel-based repository #277

marceltaeumel opened this issue Jul 24, 2020 · 3 comments · Fixed by #282
Assignees
Labels
bug mandatory workaround-for-third-parties Issues or fixes added to work around a problem in other software not maintained here.
Milestone

Comments

@marceltaeumel
Copy link
Contributor

For example, see https://github.com/hpi-swa/MessageSendRecorder/tree/master/packages

I cannot load the repository because the Tonel reader will not be chosen. In Metacello, see MCFilesystemFetchOnlyRepository >> #isTonelRepo.

@j4yk
Copy link
Collaborator

j4yk commented Jul 24, 2020

For some reason the only method in the Tonel classes that cares about the properties file is TonelRepository class>>#isFiletreeAlternateFormat: and it is not sent. Seems like the writing of the properties file is an Iceberg responsibility in Pharo, though I did not investigate.

@j4yk j4yk added the mandatory label Jul 24, 2020
@tom95
Copy link
Collaborator

tom95 commented Jul 26, 2020

The way I see it, an IceRepository will create a .properties file whenever you commit and it doesn't find one yet (see IceRepositoryProperties class>>#fromFileReference:commitish:, which is called from the commitish, which in turn is called when the workingcopy wants to initialize its own properties based on a reference commit).

In theory, Metacello would be able to distinguish between Tonel and Filetree repos without the .properties file as well, by checking if the package folders have a suffix (tonel just writes the name, e.g. MessageSendRecorder whereas Filetree writes MessageSendRecorder.package). I'm not sure whether this check is sufficiently reliable though, in particular with the risk of the lazy-loading of Tonel in Metacello thus potentially being triggered without need.

My suggestion for this would be to write a .properties file whenever the user does a conscious choice about the package format. I would go on to say that whenever a new package is added, Squot should refer to the .properties file and choose the respective format for the new package.

What do you think?

@marceltaeumel
Copy link
Contributor Author

Fall back to checking ".package" suffix if there is no ".properties" file present. :-)

@j4yk j4yk added this to the release 0.9.0 milestone Aug 11, 2020
j4yk added a commit that referenced this issue Sep 3, 2020
When going back to #filetree, write that into the properties.
Closes #277
@j4yk j4yk self-assigned this Sep 3, 2020
@j4yk j4yk added the workaround-for-third-parties Issues or fixes added to work around a problem in other software not maintained here. label Sep 4, 2020
@j4yk j4yk closed this as completed in #282 Sep 20, 2020
j4yk added a commit that referenced this issue Sep 25, 2020
When going back to #filetree, write that into the properties.
Closes #277

(cherry-picked from commit 554ff7a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mandatory workaround-for-third-parties Issues or fixes added to work around a problem in other software not maintained here.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants