[英]F# package for Sublime Text Build System absent
I am starting out with F# and trying to get it to work with Sublime Text 3 with a package, https://github.com/fsharp/sublime-fsharp-package . 我从F#开始,尝试通过包https://github.com/fsharp/sublime-fsharp-package使其与Sublime Text 3一起使用。 After installing the package using Package Control, I see F# appear as an available language to use in Sublime Text's bottom bar, and syntax highlighting appears to work more or less, from what I can tell, but the build system for F# fails to appear as it should. 使用Package Control安装软件包后,我看到F#在Sublime Text的底部栏中显示为可用的语言,并且语法高亮显示或多或少起作用,但据我所知,但是F#的构建系统无法显示为这应该。
So, trying to fix things, I run "build.sh install" and get an error, "Cannot open assembly '.paket/paket.bootstrapper.exe': No such file or directory." 因此,尝试修复问题,我运行“ build.sh install”并收到错误消息,“无法打开程序集'.paket / paket.bootstrapper.exe”:没有此类文件或目录。 I am sort of stuck. 我有点卡住了。 Many thanks for any help. 非常感谢您的帮助。
From the comments you've made, you appear to be a little unfamiliar with the Unix underpinnings of OS X. I'll explain those first, then I'll suggest something for you to try that may fix your problem. 从您的评论中,您似乎对OS X的Unix基础有点不熟悉。我将首先解释它们,然后为您提供一些建议,以尝试解决问题。
Technically, files or directories whose name starts with .
从技术上讲,名称以开头的文件或目录.
are not "reserved for the system" as you put it; 如您所说,不是“为系统保留”; they're hidden . 他们被隐藏了 。 Now, it's true that Finder won't allow you to create files or directories whose name starts with .
现在,Finder确实不允许您创建名称以开头的文件或目录.
, because Apple didn't want to have to field all the tech-support calls from people who didn't know about the hidden-files feature: "I named my file ... more important stuff for work
and now it's gone ! Help!!!" ,因为Apple不想接到不了解隐藏文件功能的人的所有技术支持电话:“我为我的文件命名了... more important stuff for work
,现在不见了 !帮助!!!” But if you're in the Terminal app, then you can easily create files or directories with .
但是,如果您在“终端”应用程序中,则可以使用轻松创建文件或目录.
as their first letter: mkdir .foo
should work. 作为他们的第一个字母: mkdir .foo
应该起作用。 You won't see it when you do ls
, but ls -a
( a
for "all") will show you all files, including hidden files. 你不会看到它时,你做的ls
,但ls -a
( a
为“全”),将显示所有文件,包括隐藏文件。 And you can also do cd .foo
and create files inside the hidden .foo
directory -- and while the .foo
folder won't show up in Finder, it will be perfectly accessible in the Terminal, and to any F# programs you might write. 您也可以执行cd .foo
并在隐藏的.foo
目录中创建文件-尽管.foo
文件夹不会显示在Finder中,但可以在终端机以及您可能编写的任何F#程序中完全访问。
So when you say that you cloned https://github.com/fsprojects/Paket but it failed to include the .github
and .paket
directories, I think you just don't know how to see them. 因此,当您说您克隆了https://github.com/fsprojects/Paket但它没有包含.github
和.paket
目录时,我想您只是不知道如何看到它们。 You can't see them in the Finder (well, you can if you jump through a couple of hoops but I don't think it's worth the effort), but you can see them with ls -a
. 您无法在Finder中看到它们(嗯, 如果您跳了几圈 ,就可以看到,但是我认为这样做不值得),但是可以使用ls -a
看到它们。 Just open your terminal, run cd /Users/Username/Paket
, and then run ls -a
and I think you'll see that the .paket
and .github
directories were indeed created by your git clone
command. 只需打开终端,运行cd /Users/Username/Paket
,然后运行ls -a
,我想您会发现.paket
和.github
目录确实是由git clone
命令创建的。
So what you should probably try is this: 因此,您可能应该尝试的是:
paket.bootstrapper.exe
and paket.exe
files. 下载paket.bootstrapper.exe
和paket.exe
文件。 Put them in /Users/Username/Downloads
(or wherever the default OS X Downloads directory is if it's different -- just as long as it's somewhere where you can find them easily). 将它们放在/Users/Username/Downloads
(或者默认的OS X Downloads目录与其他目录不同的地方,只要它在您可以轻松找到它们的位置即可)。 cd /Users/Username/Library/Application\\ Support/Sublime\\ Text\\ 3/Packages/sublime-fsharp-package-master
. 即,在终端应用程序中,运行cd /Users/Username/Library/Application\\ Support/Sublime\\ Text\\ 3/Packages/sublime-fsharp-package-master
。 ls -a
and see if there's a .paket
directory. 运行ls -a
,看看是否有一个.paket
目录。 mkdir .paket
. 如果不存在,请运行mkdir .paket
。 cd .paket
so you're in the hidden .paket
directory under sublime-fsharp-package-master
. 现在执行cd .paket
使您位于sublime-fsharp-package-master
下的隐藏.paket
目录中。 ls
and see if there's a paket.bootstrapper.exe
file. 现在执行ls
,看看是否有一个paket.bootstrapper.exe
文件。 cp /Users/Username/Downloads/paket.bootstrapper.exe .
cp /Users/Username/Downloads/paket.exe .
cd ..
to go back up to the /Users/Username/Library/Application\\ Support/Sublime\\ Text\\ 3/Packages/sublime-fsharp-package-master/
directory. 重要说明 :现在,执行cd ..
可以回到/Users/Username/Library/Application\\ Support/Sublime\\ Text\\ 3/Packages/sublime-fsharp-package-master/
目录。 /Users/Username/Library/Application\\ Support/Sublime\\ Text\\ 3/Packages/sublime-fsharp-package-master/build.sh install
, try running it as ./build.sh install
. 现在,而不是运行/Users/Username/Library/Application\\ Support/Sublime\\ Text\\ 3/Packages/sublime-fsharp-package-master/build.sh install
,请尝试将其作为./build.sh install
运行。 (And also try ./build.sh Install
, since I'm pretty sure the capital I is necessary). (并尝试./build.sh Install
,因为我很确定我有必要大写)。 (BTW, If you're not familiar with the syntax that I used in steps 9, 10 and 11, where I used a single .
or two dots ..
in commands, those are a long-standing Unix idiom: .
means "the current directory", and ..
means "the parent directory".) (顺便说一句,如果您不熟悉我在步骤9、10和11中使用的语法,其中在命令中使用了一个.
或两个点..
,那是一个长期存在的Unix习惯用法: .
表示“当前目录”,而..
表示“父目录”。)
I just looked at the build.sh
script that you've been running, and it seems to assume that you've done a cd
into the package's base directory (the sublime-fsharp-package-master
directory) before running the script. 我只是查看了您一直在运行的build.sh
脚本,似乎假设您已经在运行脚本之前将cd
放入了软件包的基本目录( sublime-fsharp-package-master
目录)中。 So that could explain why it was failing: you were running it from a different directory, rather than doing a cd
first. 这样就可以解释为什么它失败了:您是从另一个目录运行它,而不是先执行cd
。 Hence why I marked step 10 as important : I think that was the root cause of the problem. 因此,为什么我将步骤10标记为重要 :我认为这是问题的根本原因。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.