Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sandbox does not work in v4.3 and main #5598

Closed
mamhoff opened this issue Jan 16, 2024 · 7 comments · Fixed by #5636
Closed

Sandbox does not work in v4.3 and main #5598

mamhoff opened this issue Jan 16, 2024 · 7 comments · Fixed by #5636
Assignees
Labels
backport-v4.3 Backport this pull-request to v4.3 confirmed Validated report type:bug Error, flaw or fault

Comments

@mamhoff
Copy link
Contributor

mamhoff commented Jan 16, 2024

In both Solidus 4.3 and in the main branch, the sandbox generates, but cannot be used. I fails with the following error:

  
ActionView::Template::Error (couldn't find file 'solidus_admin/tailwind.css' with type 'text/css'
Checked in these paths: 
  /home/anselm/code/solidus/sandbox/app/assets/builds
  /home/anselm/code/solidus/sandbox/app/assets/config
  /home/anselm/code/solidus/sandbox/app/assets/images
  /home/anselm/code/solidus/sandbox/app/assets/javascripts
  /home/anselm/code/solidus/sandbox/app/assets/stylesheets
  /home/anselm/code/solidus/sandbox/vendor/assets/images

[...] 

Solidus Version:

branches v4.3 and main

To Reproduce

git pull
git checkout v4.3 # or main
bin/sandbox
cd sandbox
rails s
# navigate to localhost:3000 and see it fail

Current behavior

Above failure

Expected behavior

I expect the sandbox to work.

Desktop (please complete the following information):

  • OS: Fedora 39
  • Browser Firefox
  • Version 121

Additional context

I would have loved to provide a fix for a flaky spec with the new admin, but I can't.

@tvdeyen
Copy link
Member

tvdeyen commented Jan 16, 2024

You need to run

bin/dev

but even with this the solidus_admin/tailwind.css does not get build in the admin/app/assets/builds folder.

@elia what are the steps to set up a working sandbox locally with solidus_admin. And how do the compiled assets end up in the engine folder in the released gem? Do we have a build step somewhere?

@tvdeyen tvdeyen added type:bug Error, flaw or fault confirmed Validated report backport-v4.3 Backport this pull-request to v4.3 labels Jan 16, 2024
@tvdeyen
Copy link
Member

tvdeyen commented Jan 16, 2024

I can confirm that solidus_admin/tailwind.css is in the built gem, but it is missing in the git checkout. What makes sense, but still I cannot see a task that builds the file during release.

@tvdeyen
Copy link
Member

tvdeyen commented Jan 16, 2024

Workaround:

  1. CD into admin
  2. Run bundle exec rake tailwindcss:build
  3. CD into sandbox
  4. start bin/dev

@elia ideally we would have a top level rake task for this or check in the tailwind.css file into the repo, because it wont change often. Then rebuild it via GH actions on push or something (as we do in Alchemy to build our admin bundles)

@elia
Copy link
Member

elia commented Jan 17, 2024

you can reduce the number of commands to:

bin/rake -C admin tailwindcss:build
bin/dev

We could also touch or build the css file as part of the sandbox script, just to avoid that nasty error, but bin/dev would still be the preferred way.

All of that should be better documented once we finalize #5595, sorry about the inconvenience.

@mamhoff
Copy link
Contributor Author

mamhoff commented Jan 17, 2024

I think this should be automated, and part of the solidus installer (at least). Also, I think this affects all extensions in the ecosystem, as none that I looked at over the past couple of days (and I looked at a few) currently build. Even the ones that should build fail with errors related to SolidusAdmin.

@tvdeyen
Copy link
Member

tvdeyen commented Jan 17, 2024

@mamhoff @elia now that #5600 has been merged most extensions should build again, right?

@tvdeyen
Copy link
Member

tvdeyen commented Jan 17, 2024

@elia what do you think about committing the built tailwind css file into the admin repo (and update it on PR merge)? That file won't change much (at least once the admin has been built out). And even in until then it makes to have it updated regularly (not just on gem release). Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v4.3 Backport this pull-request to v4.3 confirmed Validated report type:bug Error, flaw or fault
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants