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

set bufferLoaded to true for loaded buffers #56

Closed
wants to merge 1 commit into from

Conversation

NetForce1
Copy link
Contributor

set bufferLoaded to true for loaded buffers, fixes issue when setBuffer
is called before load.

set bufferLoaded to true for loaded buffers, fixes issue when setBuffer
is called before load.
@guybedford
Copy link
Owner

I've included a fix for this in the master branch - please let me know how this works for you. I'm including the associated changes in require-less now.

@jmonma
Copy link

jmonma commented Mar 29, 2013

This fixed issue #58

@NetForce1
Copy link
Contributor Author

Your fix doesn't work for me unfortunately. cssAPI.load is still called after cssAPI.setBuffer for some resources.

@guybedford
Copy link
Owner

Thanks for reporting - helps a lot. Can you provide more details on the environment or a test case? cssAPI.load is the plugin hook called by requirejs. There is some quite careful buffer checking to stop duplicate loads and it could be going wrong at various stages of interrupt in the load cycle, so I need to be able to figure out where this is.

@guybedford guybedford reopened this Apr 2, 2013
@guybedford
Copy link
Owner

Is this using less, css or both? They are two separate buffers so it could be an issue having them run together.

@NetForce1
Copy link
Contributor Author

We use both, but it seems to fail only for less stylesheets (though I have not done any extensive testing whether I can make it fail for css too). I'll try to create a test case.

@guybedford
Copy link
Owner

A test case would be useful - I'm unable to replicate this using a basic combination of css and less, so knowing how you are including which scripts when would help in finding the issue.

@NetForce1
Copy link
Contributor Author

Alright, it took some time to get a simple test case, but I think I have found one. When a css/less resource is specified as an include in the build file, and then retrieved using an async require, this issue occurs.

@guybedford guybedford mentioned this pull request Apr 6, 2013
@guybedford
Copy link
Owner

My test case is pretty much that but perhaps the issue here is that in my test case I am running locally with no network delay. Any chance of sharing a repo on github or archive? There was also a buffer fix as referenced above which has been committed. Let me know if that helps at all as well.

@guybedford
Copy link
Owner

I'm closing this assuming the previous fix sorted this out.

If not, let me know if you are still experiencing any issues and I will reopen.

@guybedford guybedford closed this Apr 7, 2013
@NetForce1
Copy link
Contributor Author

That fix unfortunately doesn't help, I created a reproduction repo: https://github.com/NetForce1/requirecss-56

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

Successfully merging this pull request may close these issues.

3 participants