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

Showing compiled notifications on "ignored" folder, for a generic file #47

Closed
jaimeeee opened this issue May 23, 2016 · 5 comments
Closed

Comments

@jaimeeee
Copy link
Collaborator

Quick, short summary:

When using PHP Laravel framework, there's a folder called "Storage" that stores the sessions info and compiled php views, etc.

When saving any php file it does't auto refresh the site, and when you manually refresh the sites, it compiles a sessions file (and MD5 filename without extension) and it just adds a dot at the end of the file:
screen shot 2016-05-23 at 11 58 06

screen shot 2016-05-23 at 12 01 42

Expected results:

To leave those files alone.

Actual results:

It is compiling them without reason, and the compiling is just adding a dot to end of the filename.

Exact steps to reproduce:

  1. Use Laravel PHP framework
  2. Save any .php file of your views
  3. It won't automatically refresh with the Browser Refreshing
  4. Refresh the site manually
  5. Wait for the compiled notification, because a session file is modified.
@bdkjones
Copy link
Owner

Please upload an example project I can use to test this. Thanks.

@jaimeeee
Copy link
Collaborator Author

jaimeeee commented May 25, 2016

I won't upload a project because it is like 7k files and my internet isn't the greatest, but it is quite easy to make a new one, since it happens even on a brand new project:
https://laravel.com/docs/5.2/installation

I configure apache normally, just a virtual host on laravel.local or whatever, and then add the project to codekit, it doesn't matter if it is through the browser refreshing port or directly to apache.

It has this folder called /storage/framework/sessions with files with an MD5 or SHA-1 hashes, then just go to your code kit browser refreshing address or your virtual host, and as soon as you enter, Laravel makes a new session file, and every time you change page it will update it and codekit will make a "compiled" version that it is exactly the same content, on the same folder but with a dot at the end.

By the way, the right click > skip this folder doesn't work correctly (I will look up if there is already an issue for this), but it adds it to the Skipped Folders field, it refreshes the project but it doesn't really ignore it? Or is it because those files (the session files) are already on the codekit3.config files array?

@bdkjones
Copy link
Owner

What's the status of this in RC1?

@dnabeast
Copy link
Collaborator

dnabeast commented Sep 19, 2016

It's still occurring. My system gets into a loop. Codekit refreshes the browser. Refreshing the browser writes a new session file over the top of the old session file. A duplicate file is written with a dot at the end. Codekit sees a new file has been updated (even though its contents hasn't changes) and refreshes the browser. Refreshing the browser writes a new session file. Repeat.

I've tried to set ignore on the folder storage/framework/sessions but it doesn't help.

However, if I ignore the storage folder it seems to right itself.

I found my own work-around which was to change the session in the .env file from "file" to "cookie" and it works fine (as Codekit isn't writing over the cookie)

*edit. It also works if I just select 'sessions' as a folder to ignore.

@bdkjones
Copy link
Owner

Okay. Testing with RC1, when I right-click the sessions folder and choose "skip this folder", it is indeed skipped correctly. That's the solution to this problem—if you're using a framework that spits out caches or logs, you need to tell CodeKit to ignore that location. There's no way for the app to know, "Oh, this is just a log file; I don't have to do anything" because every framework writes them differently and in different spots.

That said, I've added the path to this sessions folder as one of the default skipped paths for New Projects. This will not apply to beta testers, but it will for anyone who installs the app for the first time from now on. Beta testers can do the same by editing New Project Defaults and adding /storage/framework/sessions to their list.

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