Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

Getting 'Error: missing module map file' when trying to build #164

Open
sfsam opened this issue Jul 5, 2021 · 10 comments
Open

Getting 'Error: missing module map file' when trying to build #164

sfsam opened this issue Jul 5, 2021 · 10 comments

Comments

@sfsam
Copy link
Contributor

sfsam commented Jul 5, 2021

Getting an error when trying to build with either Xcode or the Makefile.

Makefile output:
error: missing module map file: '/Users/xxxx/Dev/macOS/MASShortcut/Framework/MASShortcut.modulemap (in target 'MASShortcut' from project 'MASShortcut')

Xcode output:
CleanShot 2021-07-05 at 11 33 48@2x

Xcode project navigator:
Screen Shot 2021-07-05 at 11 31 59 AM

I think this happened after the recent SPM updates. I'd try to fix myself, but unfortunately I hardly know anything about Swift or SPM.

@eternalstorms
Copy link

eternalstorms commented Aug 2, 2021

same here, then updating it to the /include/module.modulemap path results in all sorts of header files not being found...
couldn't figure out how to fix it.

@sz-zdy
Copy link

sz-zdy commented Aug 26, 2021

same here, don't know how to fix it.

@sz-zdy
Copy link

sz-zdy commented Aug 26, 2021

Hey, friends. After checking the git commits, I figure out that this problem caused by these two commits(1 and 2 in pic).
You can checkout this commit ( 3 in pic ) temporarily.
image

@eternalstorms
Copy link

👍🏻

@pointum
Copy link
Contributor

pointum commented Sep 20, 2021

There are several thing wrong with .xcodeproj now and I could not fix it either.

  • .modulemap and MASShortcutViewButtonCell are missing from the project

  • project won’t compile because it can no longer find some headers

  • MASLocalization.m should use conditional complication:

      #if SWIFT_PACKAGE
         localizationBundle = SWIFTPM_MODULE_BUNDLE;
      #else
         // old code
    
  • Also README.md SwiftPM instruction links to wrong repo

cc: @sweetppro, @shpakovski

@sweetppro
Copy link
Contributor

@pointum this should (hopefully) be fixed in this pull request:
#162

@pointum
Copy link
Contributor

pointum commented Sep 20, 2021

@sweetppro some files and headers still got unresolved. I’ve created a new PR #166.
Thank you for implementing SwiftPM. I’m going to use it but wanted to fix the project first anyway.

@sweetppro
Copy link
Contributor

sweetppro commented Sep 20, 2021

@pointum nice one!
I don't use Cocoa Pods or Carthage so weren't seeing any of the build errors.
Ill close my PR

@pointum
Copy link
Contributor

pointum commented Sep 20, 2021

@sweetppro I don’t use those either. Just a direct .xcodeproj dependency. It did not build even when I open standalone MASShortcut.xcodeproj and try to build MASShortcut framework or Demo app targets.

@sweetppro
Copy link
Contributor

@pointum ah weird, It compiles fine for me when added directly to a project via SPM.
well, for what its worth. I hope everything is fine for all situations now
:)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants