hpi-swa-lab / SqueakByExample-english

An introductory book about the Squeak/Smalltalk programming system, guiding students and developers through the environment, language, tools, and the Morphic framework by means of a series of examples and exercises.
https://www.lulu.com/shop/patrick-rein-and-christoph-thiede/squeak-by-example-60/paperback/product-8vr2j2.html
Other
25 stars 7 forks source link

Revive SBEtests #31

Closed LinqLover closed 3 years ago

LinqLover commented 3 years ago

Hi @codeZeilen,

I just discovered the awesome SBEtests package today. After running it in my recently updated Trunk image, I found out that there are dozens of tests failing for good reasons, such as 'hello' copy at: 2 put: $u; yourself or Dictionary withAll: #(7 3 1 3) which are no longer valid Smalltalk expressions, to only mention a few of them.

Is it in your interest to get the book updated to no longer to recommend this invalid expressions? If yes, may I update the relevant scripts in another PR (or are you already on this)? Also, I'd love to automate these tests, we already have set up SmalltalkCI for this repository and it should not be complicated to convert SBEmain or so into a test case.

What do you think? Can we do this? :-)

codeZeilen commented 3 years ago

As long as we do this with individual PRs for each improvement, feel free to go ahead with both, the content and the infrastructure. :)

LinqLover commented 3 years ago

Yahoo, will do that! :-)

LinqLover commented 3 years ago

@codeZeilen May I assume that all descriptions should refer to Squeak Trunk, or should we only describe what is valid for the latest release version? Concretely, 'hello' copy at: 2 put: $u; yourself --> 'hullo' does not work since Squeak6.0 Alpha, but is it valid in Squeak 5.3.

If we should refer to the release version, 6dddfd9 needs to be reverted.

codeZeilen commented 3 years ago

I would prefer using a release version. However, as we can anticipate that this is likely to change, I would suggest keeping 6dddfd9. (It is a bad idea to modify literals anyways)

LinqLover commented 3 years ago

Alright. If we are targeting the release version, shall I change the CI configuration to you a 5.3 image instead? Screenshots for some tools deviate, first of all Inspectors + Debuggers (see [squeak-dev] Please try out | Inspector Refactoring =)). On the other hand, this will increase the maintenance effort ...

codeZeilen commented 3 years ago

Hm... how exactly does it increase effort?

The problem with using trunk is that readers of SbE are likely to be Squeak beginners. They should not be required to work around whatever oddities the trunk version is throwing at them. You are right that this means that the tools should still look like they did in 5.3 ...

Am Mi., 23. Sept. 2020 um 15:15 Uhr schrieb Christoph Thiede < notifications@github.com>:

Alright. If we are targeting the release version, shall I change the CI configuration to you a 5.3 image instead? Screenshots for some tools deviate, first of all Inspectors + Debuggers (see [squeak-dev] Please try out | Inspector Refactoring =) http://forum.world.st/Please-try-out-Inspector-Refactoring-td5114974.html). On the other hand, this will increase the maintenance effort ...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/codeZeilen/SqueakByExample-english/issues/31#issuecomment-697356547, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEI3YARU5A5U4KHIRVCDHDSHHYGHANCNFSM4RVY2U5Q .

LinqLover commented 3 years ago

Hm... how exactly does it increase effort?

Good question. Using Squeak-5.3 instead of Squeak-Trunk in the .smalltalk.ston will be a trivial change, the question is how many figure scripts will break at this time. The good news is that with the exception of some refactorings, we wrote all figure scripts before February, and 5.3 was released in March. I will try out this next week.

The other problem is that as far as I understand it, the idea of automated figure scripts and SBEtests was to create a kind of self-updating book (or, if something breaks, we will get notified and can update the relevant sections); ideally, this could also help us to identify crashes in a recent Trunk version earlier. This won't work of course if we freeze the used Squeak version unless after every release someone remembers to update the book configuration. Would it be an option to use two branches (for example, release and prerelease/trunk) that only differ in terms of the Squeak version?

codeZeilen commented 3 years ago

In this case, I would prefer two build configurations. We used branches once for representing different update streams (for the teaching image) and it resulted in quite a mess to keep track of changes across different versions. I would suggest the following: Whenever we consider a version of the book "ready" for some version of Squeak we can create a branch after releasing the book version, but not before.

Am Fr., 25. Sept. 2020 um 15:55 Uhr schrieb Christoph Thiede < notifications@github.com>:

Hm... how exactly does it increase effort?

Good question. Using Squeak-5.3 instead of Squeak-Trunk in the .smalltalk.ston will be a trivial change, the question is how many figure scripts will break at this time. The good news is that with the exception of some refactorings, we wrote all figure scripts before February, and 5.3 was released in March. I will try out this next week.

The other problem is that as far as I understand it, the idea of automated figure scripts and SBEtests was to create a kind of self-updating book (or, if something breaks, we will get notified and can update the relevant sections); ideally, this could also help us to identify crashes in a recent Trunk version earlier. This won't work of course if we freeze the used Squeak version unless after every release someone remembers to update the book configuration. Would it be an option to use two branches (for example, release and prerelease/trunk) that only differ in terms of the Squeak version?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/codeZeilen/SqueakByExample-english/issues/31#issuecomment-698942846, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEI3YA64YKXBEOXHFSAUV3SHSOL7ANCNFSM4RVY2U5Q .

LinqLover commented 3 years ago

So do I understand correctly that you propose to build both an SBE_trunk.pdf and an SBE_5.3.pdf in every build? But couldn't there, hypothetically, occur any breaking change that makes it impossible to run builds for both versions? However, this is not the case yet, so I'm giving this a try ...

LinqLover commented 3 years ago

@codeZeilen Please see #38 :-)

codeZeilen commented 3 years ago

Yes, for now we should try to build both. When we are done with revising the book (for now), we can branch of 5.3 and continue evolving the book along with the system. :)