modular / modular/modular

[BUG] `mojo package .` creates `..mojopkg` instead of `$BASENAME.mojopkg`

Open
#4,631 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug modular-repo mojo
Dominant language
Mojo
Stars
29.8k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

Bug description
Actual behavior

mojo package . creates a dot-name file.

Expected behavior

I expected that mojo package . to behave the same as mojo package $PWD

Steps to reproduce
$ mojo package .
$ ls *.mojopkg
ls: *.mojopkg: No such file or directory
$ ls *mojopkg
ls: *mojopkg: No such file or directory
$ ls .*mojopkg
..mojopkg

vs

$ mojo package $PWD
$ ls -lah *mojopkg
nanoid.mojopkg
System information
  • Provide the system information by running magic info.
[1m     Magic version: 0.7.2
System
------------
       Pixi version: 0.41.4
           Platform: osx-arm64
   Virtual packages: __unix=0=0
                   : __osx=15.4.1=0
                   : __archspec=1=m2
          Cache dir: /Users/user/Library/Caches/rattler/cache
       Auth storage: /Users/user/.rattler/credentials.json
   Config locations: No config files found

Global
------------
            Bin dir: /Users/user/.modular/bin
    Environment dir: /Users/user/.modular/envs
       Manifest dir: /Users/user/.modular/manifests/pixi-global.toml

Project
------------
               Name: nanoid
            Version: 0.1.0
      Manifest file: /Users/user/go/src/github.com/cirello-py/sink/nanoid/mojoproject.toml
       Last updated: 18-05-2025 20:49:34

Environments
------------
        Environment: default
           Features: default
           Channels: https://conda.modular.com/max-nightly, https://conda.modular.com/max, https://repo.prefix.dev/modular-community, conda-forge
   Dependency count: 1
       Dependencies: max
   Target platforms: osx-arm64
  • Provide version information for MAX (includes Mojo) by pasting the output of magic list max.
Package     Version               Build    Size       Kind   Source
max         25.4.0.dev2025051805  release  10.6 KiB   conda  max
max-core    25.4.0.dev2025051805  release  177.3 MiB  conda  max-core
max-python  25.4.0.dev2025051805  release  10 MiB     conda  max-python

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing mojo package . and compare its output with mojo package $PWD in the reported nanoid project. Trace the package command's handling of . versus an absolute path, then verify that both forms create the same $BASENAME.mojopkg file.

Written by the indexing model from the issue text.

Assessment

Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.