exercism / pharo-smalltalk

Exercism exercises in Pharo.
https://exercism.org/tracks/pharo-smalltalk
MIT License
34 stars 28 forks source link

Cannot start hello-world exercise #540

Closed denismaier closed 2 years ago

denismaier commented 2 years ago

I was able to set up a new image and evaluate the init script in the playground:

Iceberg remoteTypeSelector: #httpsUrl.
Metacello new
 baseline: 'Exercism';
 repository: 'github://exercism/pharo-smalltalk:main/releases/latest';
 load.
#ExercismManager asClass welcome.

However, when I try to fetch the "Hello World" exercise, I'm getting this error message:

grafik

Any hints?

Bajger commented 2 years ago

@denismaier Hi! Which version of Pharo did you test on?

denismaier commented 2 years ago

Pharo 10.0.0

denismaier commented 2 years ago

But, I'm getting the same with Pharo 9. I must be missing something essential.

Bajger commented 2 years ago

Strange, I just did on P10 64b stable image and worked ok. image

What are your exact reprosteps?

Bajger commented 2 years ago

Do you use 64b or 32b image?

denismaier commented 2 years ago

64b...

denismaier commented 2 years ago

That's funny. I've just tried it again, and now it works. Thanks for your help. (It's weird though)

Bajger commented 2 years ago

Maybe you fetched master branch instead of main? e.g.: 'github://exercism/pharo-smalltalk/releases/latest';

denismaier commented 2 years ago

Don't think so. I haven't actually changed anything. I've just clicked on fetch exercise again, and this time it asked me for the API key instead of throwing errors.

jaccarmac commented 2 years ago

I'm seeing the same thing. Haven't tried trying again on my alpha VM, but noticed the issue there first. The second fetch attempt succeeds.

Bajger commented 2 years ago

What is the OS you are trying?

denismaier commented 2 years ago

I'm on Windows 10

jaccarmac commented 2 years ago

Gentoo Linux here.

Bajger commented 2 years ago

Problem is in how MorphicUIManager>>#modalWindow implemented, since sometimes (under circumstances that happens to you) it returns instance of WorldMorph, but usually it returns instance of SystemWindow (which implements #openModal: needed for displaying dialog). I've asked community members if they have some insight how to get system window in better way.

Bajger commented 2 years ago

@denismaier, @jaccarmac How do you guys exactly trigger an action for getting new exercise when suffering this problem? Is it from world menu? Do you have any windows opened? Where is a mouse focus? Are windows on background (collapsed) on is it visible?

jaccarmac commented 2 years ago

The short answer to your questions: By clicking "OK" in the slug dialog. From the explorer that #ExercismManager asClass welcome. creates. That explorer and the initial tutorial. Presumably in the dialog since it only happens when clicking. Nothing collapsed.

I'm able to reproduce like so:

  1. Open a Playground from the world menu.
  2. Paste in the installation snippet (Iceberg remoteTypeSelector:...)
  3. Click Do It.
  4. Right click the Exercism@... category, fetch a new exercise.
  5. Enter "hello-world" and click OK.

If I hit Enter at the end of 5 instead of clicking, it seems to work.

Bajger commented 2 years ago

@jaccarmac @denismaier You can try fix from PR by evaluating installation snippet:

Iceberg remoteTypeSelector: #httpsUrl.
Metacello new
 baseline: 'Exercism';
 repository: 'github://Bajger/pharo-smalltalk:540-Cannot-start-hello-world-exercise/src';
 load.
#ExercismManager asClass welcome.

Tested and should be working.

jaccarmac commented 2 years ago

Seems to work for me as well.

denismaier commented 2 years ago

Here too.