timpritlove

timpritlove

Ash Framework: P1.0 Chapter 9: „Following a New Artist“: ash.extend runs into an error

Chapter 9, section “Following a New Artist” is first instructing to add a new domain function follow_artist to Tunez.Music. But this function demands a create: action on Tunez.Music.ArtistFollower that does not yet exist.

Adding such a function is then suggested in the next paragraph but as it is not properly marked to be actually added (there is no blue bar referencing the file in which the change should occur) this can be understood as a sidenote which will be fixed later as the text says that function is not in the form “we want”. So most readers will just take notice and proceed.

However, the book then tells the reader to first “enable GraphQL support for the ArtistFollower resource by calling “mix ash.extend Tunez.Music.ArtistFollower graphql”. But as the create action does not yet exist, this results in an error:

% mix ash.extend Tunez.Music.ArtistFollower graphqlCompiling 5 files (.ex)
== Compilation error in file lib/tunez/music.ex ==** (Spark.Error.DslError) [Tunez.Music.ArtistFollower]interfaces → interface → follow_artist:The interface of Tunez.Music.ArtistFollower refers to a non-existent action create(ash 3.5.37) lib/ash/code_interface.ex:11: Ash.CodeInterface.require_action/2(stdlib 7.0.2) erl_eval.erl:924: :erl_eval.do_apply/7(stdlib 7.0.2) erl_eval.erl:668: :erl_eval.expr/6(stdlib 7.0.2) erl_eval.erl:276: :erl_eval.exprs/6(spark 2.2.68) /Users/tim/src/tim/tunez/lib/tunez/music.ex:1: Spark.Dsl.before_compile/1

The book is not mentioning that and is then going on to iterate over the solution several times. I think this should be organised in a way where either no errors occur when following the editing recommendations or they should be mentioned and explained.

Also, edits for “change relate_actor …” and “policy action_type(:create) …” later on lack the change marks on the sidebar for which lines should be added.

First Post!

sevenseacat

sevenseacat

Author of Ash Framework

Ah that’s unfortunate, that we’ve missed a few of the marks for which lines to add :frowning: I thought I double and triple checked everything, but it seems I missed a few. Apologies for that!

Where Next?

Popular Pragmatic Bookshelf topics Top

lirux
Hi Jamis, I think there’s an issue with a test on chapter 6. I own the ebook, version P1.0 Feb. 2019. This test doesn’t pass for me: ...
New
Mmm
Hi, build fails on: bracket-lib = “~0.8.1” when running on Mac Mini M1 Rust version 1.5.0: Compiling winit v0.22.2 error[E0308]: mi...
New
HarryDeveloper
Hi @venkats, It has been mentioned in the description of ‘Supervisory Job’ title that 2 things as mentioned below result in the same eff...
New
rmurray10127
Title: Intuitive Python: docker run… denied error (page 2) Attempted to run the docker command in both CLI and Powershell PS C:\Users\r...
New
New
AndyDavis3416
@noelrappin Running the webpack dev server, I receive the following warning: ERROR in tsconfig.json TS18003: No inputs were found in c...
New
jgchristopher
“The ProductLive.Index template calls a helper function, live_component/3, that in turn calls on the modal component. ” Excerpt From: Br...
New
brunogirin
When running tox for the first time, I got the following error: ERROR: InterpreterNotFound: python3.10 I realised that I was running ...
New
dsmith42
Hey there, I’m enjoying this book and have learned a few things alredayd. However, in Chapter 4 I believe we are meant to see the “>...
New
andreheijstek
After running /bin/setup, the first error was: The foreman' command exists in these Ruby versions: That was easy to fix: gem install fore...
New

Other popular topics Top

AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
rustkas
Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
New
AstonJ
Biggest jackpot ever apparently! :upside_down_face: I don’t (usually) gamble/play the lottery, but working on a program to predict the...
New
PragmaticBookshelf
Author Spotlight James Stanier @jstanier James Stanier, author of Effective Remote Work , discusses how to rethink the office as we e...
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
PragmaticBookshelf
Author Spotlight Rebecca Skinner @RebeccaSkinner Welcome to our latest author spotlight, where we sit down with Rebecca Skinner, auth...
New
New

Sub Categories: