#docs: initiate Elixir quickstart documen...

1 messages · Page 1 of 1 (latest)

hybrid dock
#

It works with snippet linked by ids: https://github.com/dagger/dagger/blob/7be5ac8dc658b51f8d2139782ae869f3028c25fa/docs/current/quickstart/593914-hello.mdx#L15-L19

@sweet crown do you knows if we can include Elixir snippet?
If so, is there any documentation explaining how we can add new snippets that work on our playground?

Because I see that everything is executed on play.dagger.cloud but I didn't find a way to code in another language than GQL

GitHub

A programmable CI/CD engine that runs your pipelines in containers - dagger/dagger

sweet crown
#

Hey!
Yep, you should be able to, but @last prawn worked on creating snippets, so I'm not completely sure on how the flow works.
Here's the file that retrieves an ID that should be inserted into the object in the link you mentioned.
That object is for creating a new tab in the iframe wrapper, to select between iframes (each lang is a different iframe, with the IDs in that object being the path of the iframe src: play.dagger.cloud/embed/{id})

#

So for each step of the quickstart, you'll need to generate a new ID with the GraphQL specific to each step.
For this, you'll need to create a new elixir entry in the bash script.

last prawn
#

However note that the script we are using to create embeds and IDs for the quickstart create_embed_qs doesn't support elixir yet. It would need to be updated for this. @marsh crescent is the person to coordinate with for changes to that script.

clear pike
#

I didn't realize that we already have this documentation! Thank you you all. ❤️

last prawn
#

@clear pike re-reading the discussion above and in the context of your PR https://github.com/dagger/dagger/pull/5648, I think I may have misunderstood what you were originally asking for and therefore directed you the wrong way. Apologies if this was the case!

  • I was under the impression you wanted to create an embeddable Elixir snippet for our quickstart, similar to what we have at https://docs.dagger.io/quickstart/593914/hello. In this case, you would use create_embed_qs.sh.
  • However if you wish to create embeddable Elixir snippets with custom (non-quickstart) code for other pages, then you should use create_embed.sh.
  • This is mentioned in the style guide linked above (step 7)
# for embeds apart from quickstart embeds
TOKEN=$TOKEN ./create_embed.sh YOUR-SNIPPET-FILE
# for quickstart embeds
TOKEN=$TOKEN ./create_embed_qs.sh YOUR-SNIPPET-FILE
  • As additional context: the reason we have two scripts create_embed and create_embed_qs is because the quickstart uses our example hello-dagger app repo and therefore the embed script create_embed_qs.sh needs to perform some additional tasks to set up that repo prior to executing the snippet. This is however not needed in the case of create_embed.sh.
    I'm mentioning this because I reviewed your PR above and saw that your sample Elixir code snippet is not related to the quickstart, but the script modified is create_embed_qs.sh, which is intended only for quickstart embeds. Hope this helps, feel free to ping me if you need further information.
clear pike
#

So I think we need to modify both for writing quickstart guide, right?

last prawn
clear pike
hybrid dock
#

@marsh crescent Do you know if Elixir is supported on Dagger playground? If not, what can we do to support it?

marsh crescent
clear pike
#

Thank you. 🙂

last prawn
#

Hi @clear pike. We discussed this internally and unfortunately we won't be able to add Elixir support to the API Playground / Dagger Quickstart embeds for now. At this time, we are not adding any experimental SDKs to those assets.

However, we'd love your support on the Elixir SDK docs (that you already started building) since those will be a great resource for the community to use https://github.com/dagger/dagger/pull/5530
/cc @hybrid dock @marsh crescent

clear pike