Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8080485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:25:39+00:00 2026-06-05T16:25:39+00:00

I am trying to define a dynamic var in a different namespace. The Lobos

  • 0

I am trying to define a dynamic var in a different namespace. The Lobos documentation states:

By default all migrations are kept in the lobos.migrations namespace.
It’ll get automatically loaded by migration commands, so there’s no
need to load it yourself. Thus, to use another namespace you must
change the lobos.migration/migrations-namespace dynamic variable.

I can’t figure out how to set the dynamic variable from within my new namespace.

I can do this in the repl via (ns `lobos.migration), but running this cmd from my own ns

(def ^:dynamic lobos.migration/*migrations-namespace* 'gb.install.migrations)

yields Can't create defs outside of current ns.

How can I fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:25:41+00:00Added an answer on June 5, 2026 at 4:25 pm

    Clojure vars can have a root binding that is visible to all threads. Additionally, dynamic vars can also have per-thread bindings, each visible to only one thread.

    You can temporarily create a per-thread binding for your current thread by using binding:

    (binding [lobos.migration/*migrations-namespace* 'gb.install.migrations]
      ;; binding is in effect here in the body of the binding form
      )
    

    Or if a per-thread binding is already in effect, you can change its value using set!:

    (set! lobos.migration/*migrations-namespace* 'gb.install.migrations)
    

    But it’s likely you’ll need to change this particular dynamic var in a way visible across all threads. If this is true, you’ll need to change its root binding by doing something like this:

    (alter-var-root #'lobos.migration/*migrations-namespace*
                    (constantly 'gb.install.migrations))
    

    Note I don’t know anything about lobos itself and so can’t say with certainty that any of these will actually set the var in the way lobos desires.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to define a dynamic variable within a function in Rhino JavaScript
I am trying to define a dynamic array containing char pointers that point to
Im trying to define a select tag in my view. My view looks like
I'm trying to define a method in my vb.net interface that will only accept
I am trying to define a number of classes based on an abstract base
I am trying to define an abstract class that has operators to compare two
I'm trying to define a very simple function in Drools as below: import java.util.List;
I am trying to define nested modules, but I couldn't find any complete explanations
I'm trying to define a service endpoint in my web.config file so that I
I'm trying to define a new array through a where query but I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.