MultiMarkdown-6 icon indicating copy to clipboard operation
MultiMarkdown-6 copied to clipboard

make swift fails because of old swift tools version

Open nickasd opened this issue 6 years ago • 9 comments

Running make swift causes this error:

package at 'MultiMarkdown-6' is using Swift tools version 3.1.0 which is no longer supported; use 4.0.0 or newer instead

I couldn't find where this version number would have to be replaced.

nickasd avatar Jul 29 '19 13:07 nickasd

No idea. I don't use Swift -- that was done a couple of years ago to demonstrate that MMD could be used with Swift (it can), but I haven't used it since.

fletcher avatar Jul 29 '19 13:07 fletcher

It looks like the Package.swift file is outdated, so I'm trying to bring it up to date. There is a libMultiMarkdown dependency: do you recall where that dependency was supposed to be or how it should be built?

nickasd avatar Jul 29 '19 14:07 nickasd

mmd-swift is basically an empty wrapper around libMultiMarkdown, with the main.swift demo file thrown in.

fletcher avatar Jul 29 '19 15:07 fletcher

Ok, but it seems that the libMultiMarkdown should already be built before running the command make swift, because it complains that the dependency cannot be found. That’s why I asked where the dependency is supposed to be built, so that I could update the path if necessary. Or do you think that it should be handled by make swift as well?

nickasd avatar Jul 29 '19 16:07 nickasd

swift build, or the package manager, or whatever is supposed to take care of that as part of the build process. But like I said, that was a few years ago.

fletcher avatar Jul 29 '19 17:07 fletcher

Do you know if the only difference between the Objective-C and the Swift versions is the Xcode project? Because I'm thinking that since C can be embedded in Objective-C code but not in Swift unless you use a bridging header, probably it wouldn't be worth it trying to make the build work for Swift. Maybe it would just be enough to set up the right bridging header?

nickasd avatar Jul 29 '19 22:07 nickasd

That's what this did -- MMD-6 has always been written in C (and presumably always will be until something better comes along). The make swift functionality built libMMD and packaged it to be compatible with swift projects. It worked (as demonstrated by the trivial test project), but based on your comments, it would seem that Apple has broken backwards compatibility with build workflows....

fletcher avatar Jul 31 '19 14:07 fletcher

It worked (as demonstrated by the trivial test project)

This sounds as if there was a working (compiled) sample project to confirm this hypothesis, but I think that's not what you mean, right?

nickasd avatar Aug 05 '19 07:08 nickasd

make swift created a command line utility that would convert a simplistic MMD text string into HTML. It did not have logic to handle command line options or to read files, but there was no reason to reinvent that. It was proof that libMultiMarkdown worked properly in a swift program to handle processing of text into HTML (or LaTeX or whatever)

fletcher avatar Aug 06 '19 02:08 fletcher