Wandering Through Dependency Hell

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Wandering Through Dependency Hell

Evan Donahue
Hello,

I was wondering if there was a resource somewhere that laid out a best practice for how to manage version control in Pharo. I know *how* to use Monticello and Versionner, but something about the way I use them inevitably dooms my efforts to the darkest circles of dependency hell, where strange and gruesome partial versions of old and abandoned branches come back to haunt me like some kind of object oriented night of the living dead.

In particular, I usually commit daily to a local repository on my disk, and only occasionally to a remote repository like smalltalkhub. It has come to my attention that this only commits recent changes, with the result that no single repository actually has the current working code that I see in my image. I am in that situation now, where loading the latest version revives some distant and broken code where good, currently working code should be. If anyone knows how to figure out how to force all the current good code in my image into one massive commit, so that other people can check out the current, working version, please do not hesitate to let me know.

Thanks,
Evan
Reply | Threaded
Open this post in threaded view
|

Re: Wandering Through Dependency Hell

Juraj Kubelka
Hi,

I do not understand much you problem. But reading about your commit strategy, you can use Gofer object and its push method to sync properly local changes to a remote repository. Check Pharo books. There are examples.

If you inspect a configuration object, there used to be a GT-Inspector extension with dependency visualization. Maybe this is present only in the Moose image.

Cheers,
Juraj

--
Juraj Kubelka

> El 09-05-2017, a las 22:42, Evan Donahue <[hidden email]> escribió:
>
> Hello,
>
> I was wondering if there was a resource somewhere that laid out a best practice for how to manage version control in Pharo. I know *how* to use Monticello and Versionner, but something about the way I use them inevitably dooms my efforts to the darkest circles of dependency hell, where strange and gruesome partial versions of old and abandoned branches come back to haunt me like some kind of object oriented night of the living dead.
>
> In particular, I usually commit daily to a local repository on my disk, and only occasionally to a remote repository like smalltalkhub. It has come to my attention that this only commits recent changes, with the result that no single repository actually has the current working code that I see in my image. I am in that situation now, where loading the latest version revives some distant and broken code where good, currently working code should be. If anyone knows how to figure out how to force all the current good code in my image into one massive commit, so that other people can check out the current, working version, please do not hesitate to let me know.
>
> Thanks,
> Evan

Reply | Threaded
Open this post in threaded view
|

Re: Wandering Through Dependency Hell

Tudor Girba-2
Hi,

> On May 11, 2017, at 3:55 AM, Juraj Kubelka <[hidden email]> wrote:
>
> Hi,
>
> I do not understand much you problem. But reading about your commit strategy, you can use Gofer object and its push method to sync properly local changes to a remote repository. Check Pharo books. There are examples.
>
> If you inspect a configuration object, there used to be a GT-Inspector extension with dependency visualization. Maybe this is present only in the Moose image.

Indeed, this is available in the Moose image by default, but can also be loaded in plain Pharo if you load the complete version of GTInspector.

Cheers,
Doru


> Cheers,
> Juraj
>
> --
> Juraj Kubelka
>
>> El 09-05-2017, a las 22:42, Evan Donahue <[hidden email]> escribió:
>>
>> Hello,
>>
>> I was wondering if there was a resource somewhere that laid out a best practice for how to manage version control in Pharo. I know *how* to use Monticello and Versionner, but something about the way I use them inevitably dooms my efforts to the darkest circles of dependency hell, where strange and gruesome partial versions of old and abandoned branches come back to haunt me like some kind of object oriented night of the living dead.
>>
>> In particular, I usually commit daily to a local repository on my disk, and only occasionally to a remote repository like smalltalkhub. It has come to my attention that this only commits recent changes, with the result that no single repository actually has the current working code that I see in my image. I am in that situation now, where loading the latest version revives some distant and broken code where good, currently working code should be. If anyone knows how to figure out how to force all the current good code in my image into one massive commit, so that other people can check out the current, working version, please do not hesitate to let me know.
>>
>> Thanks,
>> Evan
>

--
www.tudorgirba.com
www.feenk.com

"To lead is not to demand things, it is to make them happen."





Reply | Threaded
Open this post in threaded view
|

Re: Wandering Through Dependency Hell

Milan Vavra
In reply to this post by Evan Donahue
Evan wrote:

>If anyone knows how to figure out how to force all the current good code in
>my image into one massive commit, so that other people can check out the
>current, working version, please do not hesitate to let me know.

If you are using mczs, all changes are committed each time.

Each mcz archive is a snapshot of all the classes and methods in the system
category that defines the package at the moment in time when you saved it.
Much like a git commit.

So all you need to do is to save another version of the package. Just make
sure the filename you use is unique.

If in doubt, you can use a version number that resembles a timestamp like
YourPackage-YourName.201705111236.mcz where 201705111236 is 2017-05-11,
12:36.

Best Regards,

Milan Vavra
Reply | Threaded
Open this post in threaded view
|

Re: Wandering Through Dependency Hell

Pharo Smalltalk Users mailing list
In reply to this post by Evan Donahue
Evan wrote:

>If anyone knows how to figure out how to force all the current good code in
>my image into one massive commit, so that other people can check out the
>current, working version, please do not hesitate to let me know.

If you are using mczs, all changes are committed each time.

Each mcz archive is a snapshot of all the classes and methods in the system
category that defines the package at the moment in time when you saved it.
Much like a git commit.

So all you need to do is to save another version of the package. Just make
sure the filename you use is unique.

If in doubt, you can use a version number that resembles a timestamp like
YourPackage-YourName.201705111236.mcz where 201705111236 is 2017-05-11,
12:36.

Best Regards,

Milan Vavra




--
View this message in context: http://forum.world.st/Wandering-Through-Dependency-Hell-tp4946266p4946653.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Wandering Through Dependency Hell

Evan Donahue
In reply to this post by Juraj Kubelka
Thanks for the replies.

With Juraj's help, I figured out the first layer of my problem. I needed to recompile all the methods after loading the code with Monticello, because their bytecode was all messed up. Now I can get code out of the image via plain Monticello. Tests were failing not because of reversion, but because of random bytecode issues. There is still some odd versioning behavior, but it's not my biggest problem.

Now I am trying to create a ConfigurationOf with Versionner. I followed this video:

https://www.youtube.com/watch?v=cFRJDuWL-Q0

When I go to commit, Versionner gives me an array out of bounds due to the "KommitStagingArea" not having any elements in its packages array. Sometimes this yields no upload, sometimes it uploads a Config that does not seem to work when I try to download with it, and sometimes I get a debugger on smalltalkhub while trying to view the source. I'm not sure how to predict or interpret which will happen.

Essentially, I am just trying to find the simplest, easiest way to let people download a project and its dependencies. The above errors have happened in more or less every project I've tried to commit, and I know other people don't have the same difficulty I do in trying to get code out of and into an image, so I suspect that it is something about my workflow that is off, or possibly my computer. So my first question is, is that video still up to date, or has the system changed?

Thanks,
Sorry for what I know is not a lot of detail. I'm not really sure where to start with this one.
Evan

Reply | Threaded
Open this post in threaded view
|

Re: Wandering Through Dependency Hell

Evan Donahue
Ok, I think this case is closed. Having gotten my code out of the image with Monticello and manual recompile, I can use versionner for upload if and only if I do it in Pharo6. Likewise, I can use it for download if and only if I do it in Pharo6. Pharo5 breaks in strange ways on both ends, even with fresh image/vm. I take this as a sign that I should transition to Pharo6.

Relievedly yours,
Evan