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

lein-ring setting readonly attribute to files on windows #167

Open
shrayasr opened this issue Aug 21, 2015 · 1 comment
Open

lein-ring setting readonly attribute to files on windows #167

shrayasr opened this issue Aug 21, 2015 · 1 comment

Comments

@shrayasr
Copy link

Hello,

I just finished my first ever production project with Clojure (yay!) and thoroughly loved the experience of using clojure, lein and lein-ring. Thanks much for contributing such a great deal to the ecosystem.

When we started to package the app up for production, we chose the lein uberjar way for which I needed to have a -main function. After I set all of this up and ran lein ring server-headless, I got more output that said compiling ... and so on. It didn't affect me, so I moved on.

After doing this, when I was editing a file, I kept getting the error saying that the file was readonly. I can however force save the file and it all turns out to be ok but then I don't think this is the right way (and it gets troublesome if I have to do it everytime).

Here is a gist of the smallest code set to reproduce this issue.

The steps that I followed to get this were:

  1. Open a cmd window at project location

  2. run lein ring server-headless and this is what I see:

    >lein ring server-headless
    Compiling win-ro-problem-test.handler
    2015-08-21 16:41:36.198:INFO::main: Logging initialized @2486ms
    2015-08-21 16:41:38.596:INFO::main: Logging initialized @1279ms
    2015-08-21 16:41:42.000:INFO:oejs.Server:main: jetty-9.2.10.v20150310
    2015-08-21 16:41:42.032:INFO:oejs.ServerConnector:main: Started ServerConnector@7ca22ff0{HTTP/1.1}{0.0.0.0:3000}
    2015-08-21 16:41:42.032:INFO:oejs.Server:main: Started @4715ms
    Started server on port 3000
    
  3. I then open up handler.clj in an editor window

  4. Go over to http://localhost:3000/foo and verify that the response is shown

  5. Come back to editor window, change response to something else and save (file still isn't readonly)

  6. Go over to the browser and refresh, verifying that the new response is shown

  7. Come back to the editor, file is now readonly.

If I revert the change I made, then the readonly issue goes away. This means that that change is the one that is causing the problem. Also in the gist, i've added the diff of the changes I made to get to the version where I can generate a jar with lein uberjar.

Do let me know if you need any other details. Many thanks.

@dijonkitchen
Copy link

Any updates or should it be closed?

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