Clojure

Add support for running -main namespace from clojure.main without AOT

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: Release 1.3
  • Component/s: None
  • Labels:
    None
  • Approval:
    Ok

Description

This patch allows clojure.main to accept an argument pointing to a namespace to look for a -main function in. This allows users to write -main functions that will work the same whether the code is AOT-compiled for use in an executable jar or just run from source.

Discussed on the mailing list: http://groups.google.com/group/clojure/browse_thread/thread/bcf3c7c0e002601e

Activity

Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - Converted from http://www.assembla.com/spaces/clojure/tickets/315 Attachments: 0001-Add-support-for-running-main-namespaces-from-clojure.patch - https://www.assembla.com/spaces/clojure/documents/a4lY7et7Sr34T_eJe5dVir/download/a4lY7et7Sr34T_eJe5dVir 0002-Add-support-for-running-main-namespaces-from-clojure.patch - https://www.assembla.com/spaces/clojure/documents/azCC8mvcmr35JueJe5cbLA/download/azCC8mvcmr35JueJe5cbLA
Hide
Assembla Importer added a comment -

technomancy said: [file:a4lY7et7Sr34T_eJe5dVir]: Patch to provide above functionality

Show
Assembla Importer added a comment - technomancy said: [file:a4lY7et7Sr34T_eJe5dVir]: Patch to provide above functionality
Hide
Assembla Importer added a comment -

scgilardi said: I like the idea and the code and I'd be happy to see this added to clojure.main. I'll test this evening and comment again.

Show
Assembla Importer added a comment - scgilardi said: I like the idea and the code and I'd be happy to see this added to clojure.main. I'll test this evening and comment again.
Hide
Assembla Importer added a comment -

scgilardi said: [file:azCC8mvcmr35JueJe5cbLA]: updated patch with minor doc changes

Show
Assembla Importer added a comment - scgilardi said: [file:azCC8mvcmr35JueJe5cbLA]: updated patch with minor doc changes
Hide
Assembla Importer added a comment -

scgilardi said: I tested Phil's patch and found it to work well. I made some small changes to the documentation strings and the order of function definitions in the source file. I've attached my revised patch (which includes Phil's as a separate commit).

I think Clojure users will find this a valuable addition and I think it would be a good idea to include it in 1.2 if possible.

Show
Assembla Importer added a comment - scgilardi said: I tested Phil's patch and found it to work well. I made some small changes to the documentation strings and the order of function definitions in the source file. I've attached my revised patch (which includes Phil's as a separate commit). I think Clojure users will find this a valuable addition and I think it would be a good idea to include it in 1.2 if possible.
Hide
Assembla Importer added a comment -

technomancy said: Steve's changes make sense. It would be great if this could be merged for the 1.2 RC.

Show
Assembla Importer added a comment - technomancy said: Steve's changes make sense. It would be great if this could be merged for the 1.2 RC.
Hide
Assembla Importer added a comment -

technomancy said: Any chance we could move this forward? Considering Steve is the original author of clojure.main, I think it makes sense to apply his patch.

Show
Assembla Importer added a comment - technomancy said: Any chance we could move this forward? Considering Steve is the original author of clojure.main, I think it makes sense to apply his patch.
Hide
Assembla Importer added a comment -

stu said: Updating tickets (#263, #305, #315, #364, #453)

Show
Assembla Importer added a comment - stu said: Updating tickets (#263, #305, #315, #364, #453)

People

  • Assignee:
    Unassigned
    Reporter:
    Anonymous
Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: