# Question: namespace-require

**URL:** <https://racket.discourse.group/t/question-namespace-require/669>\
**Category:** Questions & Answers\
**Tags:** question\
**Created:** [February 8, 2022, 2:38am UTC](https://racket.discourse.group/t/question-namespace-require/669 "2022-02-08T02:38:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joskoot](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/joskoot/32/1964_2.png) [@joskoot](https://racket.discourse.group/u/joskoot)\
**Post date:** [February 8, 2022, 2:38am UTC](https://racket.discourse.group/t/question-namespace-require/669/1 "2022-02-08T02:38:27Z")

</div>

Hi

This works:

```scheme
(let ((ns (make-base-namespace)))
 (parameterize ((current-namespace ns))
  (namespace-require '(file "tests.rkt"))))

```

This does not:

```scheme
(let ((ns (make-base-namespace)))
 (namespace-require '(file "tests.rkt") ns))

```

require: unknown module  
module name: "E:\a-simple-interpreter\tests.rkt"

How come?   
From the docs I understand that if the first one works, the second one should work too.  
Do I misunderstand the docs?  
Thanks, Jos

I forgot to mention: DrRacket 8.3 BC, windows 10

---

<div class="post-metadata">

**Author:** ![dannypsnl](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/dannypsnl/32/917_2.png) [@dannypsnl](https://racket.discourse.group/u/dannypsnl)\
**Post date:** [February 8, 2022, 7:18am UTC](https://racket.discourse.group/t/question-namespace-require/669/2 "2022-02-08T07:18:16Z")

</div>

You probably can use

```scheme
(parameterize ([current-namespace ns])
  (namespace-require '(file "tests.rkt"))
  ...)

```

to replace?

---

<div class="post-metadata">

**Author:** ![sorawee](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sorawee](https://racket.discourse.group/u/sorawee)\
**Post date:** [February 8, 2022, 7:36am UTC](https://racket.discourse.group/t/question-namespace-require/669/3 "2022-02-08T07:36:34Z")

</div>

This topic has been raised before in the old mailing list: [https://www.mail-archive.com/racket-users@googlegroups.com/msg43291.html](https://www.mail-archive.com/racket-users@googlegroups.com/msg43291.html)

I also logged this as an issue in the GitHub repo: [https://github.com/racket/racket/issues/3307](https://github.com/racket/racket/issues/3307)

My understanding is the same as `mxork` from GitHub: I only know that in most situations, `current-namespace` should be adjusted. From what @mflatt said, there appears to be a legitimate use case of _not adjusting_ `current-namespace` but _adjusting_ the second argument, but I do not know what this use case actually is.

---

<div class="post-metadata">

**Author:** ![joskoot](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/joskoot/32/1964_2.png) [@joskoot](https://racket.discourse.group/u/joskoot)\
**Post date:** [February 8, 2022, 10:22am UTC](https://racket.discourse.group/t/question-namespace-require/669/4 "2022-02-08T10:22:11Z")

</div>

Hi sorawee  
Thanks, Jos
