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

getopt_long not implemented #1

Closed
darrenkopp opened this issue Oct 31, 2014 · 28 comments
Closed

getopt_long not implemented #1

darrenkopp opened this issue Oct 31, 2014 · 28 comments

Comments

@darrenkopp
Copy link
Owner

once this is implemented, it will compile on windows. you can do it currently by changing getopt_long to getopt and it will compile and run.

@am11
Copy link
Collaborator

am11 commented Oct 31, 2014

THANKS a lot @darrenkopp !! You rock! 💯 👍

I will take a stab at it soon. 😃

/cc @mgreter, @xzyfer

@am11
Copy link
Collaborator

am11 commented Oct 31, 2014

@QuLogic, is there an STL equivalent of getopt and getopt_long in C++11, which all cpp11 compatible compilers support?

@am11
Copy link
Collaborator

am11 commented Oct 31, 2014

This is fixed by 1d29e0f. I found the repo: https://github.com/alex85k/wingetopt/.

The compilation was successful. We don't need any extra guard like unistd.h.

@darrenkopp
Copy link
Owner Author

awesome. nicely done.

@am11
Copy link
Collaborator

am11 commented Oct 31, 2014

@darrenkopp, can you please register the repo at appveyor? https://ci.appveyor.com/projects/darrenkopp/sassc-win/

@am11
Copy link
Collaborator

am11 commented Oct 31, 2014

You can also sign in with GitHub on Appveyor. :)

@darrenkopp
Copy link
Owner Author

@am11
Copy link
Collaborator

am11 commented Oct 31, 2014

Brilliant! 👍

@am11
Copy link
Collaborator

am11 commented Nov 1, 2014

@mgreter
Copy link

mgreter commented Nov 1, 2014

👍

@am11
Copy link
Collaborator

am11 commented Nov 1, 2014

Now it is testing against four configurations: Release Win32 and Release Win64.

Those are the custom configuration names in VS project file, which are used as is in appveyor.yml.

For more configuration options, see: http://www.appveyor.com/docs/build-configuration.

@am11
Copy link
Collaborator

am11 commented Nov 1, 2014

I have merged the functionality of libsass and sassc travis script.

The build is successful, after that it hooks into ruby and run the command: https://ci.appveyor.com/project/darrenkopp/sassc-win/build/1.0.28/job/hvcn4p415ryelkfw

It fails the test, where it says: @import "http://fonts.googleapis.com/css?family=Droid+Sans"; and expect the same. Notice that this is CSS3 import, so shouldn't be processed at all. But it is failing with a weird error:

C:/projects/sassc-win/sassc-win/sass-spec/spec/libsass-todo-tests/http_import/input.scss:1: 
file to import not found or unreadable: "http://fonts.googleapis.com/css?family=Droid+Sans"
Current dir: C:/projects/sassc-win/sassc-win/sass-spec/spec/libsass-todo-tests/http_import/
Command exited with code 4

@mgreter , @xzyfer, any idea if it is a libsass issue or sass-spec.rb ? It seems like libsass is trying to read from URL and the runtime is not letting it. In which case, it would be a libsass issue that it should try to access the file in CSS3 @import scenario.

@am11
Copy link
Collaborator

am11 commented Nov 1, 2014

Or could it be this issue: http://stackoverflow.com/a/15591530? Do we need compass gem for running sassc tests?

@darrenkopp
Copy link
Owner Author

I would be quite surprised if you did

@am11
Copy link
Collaborator

am11 commented Nov 1, 2014

Yes! It shouldn't read CSS3 @import file in first place, especially the font URL..

@darrenkopp
Copy link
Owner Author

Agreed, though I did have someone recently say something to me similar where it was embedding s normal CSS file, but I never verified if that's what was actually happening or if that's just what it sounded like

@am11
Copy link
Collaborator

am11 commented Nov 1, 2014

@darrenkopp, do you support "custom functions" features of libsass in libsass-net downstream? @mgreter shared some useful bits for node-sass sass/node-sass#332, but unfortunately, I didn't get time to wrap my head around it yet. 👎

@darrenkopp
Copy link
Owner Author

Unlikely, I just wrap it purely, no more, no less.

@am11
Copy link
Collaborator

am11 commented Nov 1, 2014

That would be interesting to implement custom functions in Web Essentials, when node-sass get this support. WE is now using both node-sass and ruby sass: https://github.com/madskristensen/WebEssentials2013/blob/641978629c51f824f2dffe3ce56b2c62aced1256/EditorExtensions/Resources/server/services/. Perhaps, we would let the users add sass-custom-functions.js in solution items and enable reference.js, so they can manage in multiple files. :D

@am11
Copy link
Collaborator

am11 commented Nov 1, 2014

Probably it's worth mentioning that the vcxproj file is now updated with latest libsass changes. I included cencode.c, json.hpp and json.cpp to the project and it compiled with no errors (just 75 warnings)! 😄

@am11
Copy link
Collaborator

am11 commented Nov 1, 2014

Isn't that test incorrect?

Shouldn't it be: @import url("http://fonts.googleapis.com/css?family=Droid+Sans").

Even the expected output isn't CSS3?

See http://stackoverflow.com/q/26349982/

I have used the --ignore-todo flag now.

Fingers crossed ..

@darrenkopp
Copy link
Owner Author

No, that test is correct. It's supposed to just pass through.

http://sass-lang.com/documentation/file.SASS_REFERENCE.html#import

@am11
Copy link
Collaborator

am11 commented Nov 2, 2014

Thanks for the link @darrenkopp! It seems like that is not covered by libsass yet.

BREAKING NEWS All tests are passing now: https://ci.appveyor.com/project/darrenkopp/sassc-win/build/1.0.29. Yay ❕❕
Travis-ci build also runs same amount of tests: https://travis-ci.org/sass/libsass/jobs/39661259. 👍 (but I couldn't find the --ignore-todo flag in their script though)

Now we need to figure out a way to split appveyor.yml, and push part of it to libsass. So, whenever commit is made in libsass, the Appveyor's libsass account clone into this repo and get the other half (like it does with sassc CLI atm). But that is something I haven't figured yet, as we are using solution based and compiling everything at once and running the test all from one place. I think libsass' appveyor.yml should only clone into our repo and trigger our appveyor.yml. I don't know how to do that yet. 😎

@am11
Copy link
Collaborator

am11 commented Nov 18, 2014

Hello @darrenkopp, I have an unrelated question to this topic:

I am trying to figure out the correct compiler switches to build node-sass project on Windows. I looked into the docs and there are plenty of them. We already have the build system in place, which builds binaries for nodejs using VS2013's cl.exe, that is; node-gyp.

Here is the configuration for VS: binding.gyp#L69-L84.

There are reports that the binary isn't working on Windows 7 x86, which I built on Win8.1.1 x64 running nodejs x86.

Is there any special compiler flag we need to set, which guarantees that the binary would run on Windows 7 as good as 8?

Thanks.

@darrenkopp
Copy link
Owner Author

@am11 and you are sure they have visual c++ 2013 redistributable runtime? http://www.microsoft.com/en-us/download/details.aspx?id=40784

That's the only thing I can think of that would cause a problem, should work on windows 7 fine, but I know someone running Win 7 x64 that could probably run it to test.

@am11
Copy link
Collaborator

am11 commented Nov 18, 2014

Actually it was this bug reported for node-sass latest released version 1.2.2 sass/node-sass#524 which states the issue. I don't have Windows 7 machine. Is that necessary? Can we make the binary independent of dependency on redist runtime?

@davetgreen, momentarily, can you confirm that you have C++2013 runtime and if not; installing it fixes the issue?

@darrenkopp
Copy link
Owner Author

Yeah, I'd assume that it should work anywhere, but I'm not a c++ developer so I don't really know. I'd be surprised if Win7 didn't work.

@am11
Copy link
Collaborator

am11 commented Nov 18, 2014

Thanks for your help! I will try to get my hands on a Windows 7 32-bits VM and test it out. :)

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

3 participants