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

What versions of libsass and sass2scss does pike use? #41

Open
abdellahi-brahim opened this issue Sep 8, 2023 · 7 comments
Open

What versions of libsass and sass2scss does pike use? #41

abdellahi-brahim opened this issue Sep 8, 2023 · 7 comments

Comments

@abdellahi-brahim
Copy link

I'm trying to use the Web.Sass.sass2scss method in Pike to compile SASS. However, I'm encountering errors, which I suspect are due to incorrect dependencies. Could you specify which versions of libsass and sass2scss Pike relies on? Also, what are the necessary packages I should install to ensure the Web.Sass methods function properly?

@grubba
Copy link
Member

grubba commented Sep 8, 2023

I am not certain of the full set of supported versions, but libsass-3.6.5 seems to work.

What OS are you using? For many OSes you need to install the libsass-devel (or similar) package.

@abdellahi-brahim
Copy link
Author

I'm running Ubuntu 18.04. The libsass seemed to solve the issues (I downloaded and compiled the package). The sass2scss library seemed to not work with that instalation, so I tried to install the sass2scss package from this GitHub repository, and the problem persists :C

@grubba
Copy link
Member

grubba commented Sep 8, 2023

Hmm... Ubuntu 18.04 seems to have libsass 3.4.8. Have you installed libsass-dev?

@grubba
Copy link
Member

grubba commented Sep 8, 2023

The Web.Sass module seems to build without issue in both Pike 8.0 and master on Ubuntu 18.04 with libsass-dev installed.

@abdellahi-brahim
Copy link
Author

abdellahi-brahim commented Sep 14, 2023

The problem is when I try to use the Web.Sass.sass2scss(data) method, it does not seem to work, I am using the version 8.0 release 604

@abdellahi-brahim
Copy link
Author

abdellahi-brahim commented Sep 14, 2023

Just to provide more context. I am trying to run the following code:

 write("libsass version:   %s\n", Web.Sass.libsass_version());
 write("sass2scss version: %s\n", Web.Sass.sass2scss_version());

 string sass_code = #"
	div
	    font-size: 12px
	p
		color: red
 ";

string scss_code = Web.Sass.sass2scss(sass_code);
write("Converted SCSS:\n" + scss_code);

But all I get is the following output:

main.pike:17:Index 'sass2scss' not present in module Sass.
main.pike:17:Indexed module was: Web.Sass.
main.pike:17:Too many arguments to `() (function call) (expected 0 arguments).
main.pike:17:Got     : string.
Pike: Failed to compile script.

Source: https://pike.lysator.liu.se/generated/manual/modref/ex/predef_3A_3A/Web/Sass/sass2scss.html

@abdellahi-brahim
Copy link
Author

abdellahi-brahim commented Sep 14, 2023

After some research I saw that the sass2scss method was only introduced in this release:

https://git.lysator.liu.se/pikelang/pike/-/releases/v8.0.702

But when trying this and the latest the method is not recognized. Is it a compilation issue?

main.pike:5:Indexed module was: Web.
main.pike:6:Index 'Sass' not present in module Web.
main.pike:6:Indexed module was: Web.
main.pike:10:Index 'Sass' not present in module Web.
main.pike:10:Indexed module was: Web.```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants