elm-workshop icon indicating copy to clipboard operation
elm-workshop copied to clipboard

In part 7 of Frontend Masters course, 'elm-lang/core' references 5.0.0 api but video uses 4.0.0 api

Open EverybodyKurts opened this issue 8 years ago • 5 comments

In the Part 7 solution Frontend Masters Elm video @ the 3:00 minute mark, Mr. Feldman uses the 4.0.0 elm-lang/core api when writing the Task.perform function, which takes three arguments. Documentation can be found here.

However, the elm-lang/core dependency version referenced in elm-package.json is 5.0.0 <= v < 6.0.0. Here is the Task.perform documentation for version 5.1.1. It only takes two arguments.

I think the best course of action to simply roll back the elm-lang/core dependency to 4.0.0 and maybe leave 5.0.0 as an exercise left up to the reader once they feel comfortable with Elm. That's just my two cents though.

EverybodyKurts avatar Mar 21 '17 20:03 EverybodyKurts

After a bit more perusing, it seems elm-lang/core dependencies is tied to the elm-version. Is there such thing as a lock file for Elm that lists dependencies for each package?

EverybodyKurts avatar Mar 21 '17 20:03 EverybodyKurts

@KurtRMueller I'm running into the same issue. I think I'm going to skip this exercise until I'm more comfortable with elm.

richiekastl avatar Mar 31 '17 16:03 richiekastl

What's interesting is that there's a lesson where Richard talks about semantic versioning. It seems like Elm going from 0.17 to 0.18 would indicate a minor version change and therefore its currently existing methods would keep the same api. Obviously, though, that's not the case :).

EverybodyKurts avatar Mar 31 '17 20:03 EverybodyKurts

Pre-1.0 Elm (the language) is currently versioned on "semver shifted by one digit" - in other words, 0.17.0 -> 0.18.0 is a breaking change, whereas 0.18.0 -> 0.18.1 would be a minor change.

Not much changed between 0.17 to 0.18 except for the Http library. Now the most common way people use it is with Http.send instead of Task.perform, and I thought it would be more useful to update the code sample to use the idiomatic 0.18 way (since it's only a few lines of code different) so people could see that. 🙂

I realize this means the code is out of sync with the slides in this section...sorry about that! I plan to do a refresher course with Frontend Masters sometime around early 2018, which will bring everything up to date!

rtfeldman avatar Mar 31 '17 20:03 rtfeldman

anyone else "stuck" on this see: https://github.com/rtfeldman/elm-workshop/blob/solutions/part7/Main.elm for solution. 😉

nelsonic avatar Nov 28 '17 18:11 nelsonic