Appveyor and Pkg (for Julia 0.7-alpha)

package

#1

I have trouble making sense of the logic of the Appveyor and the new package manager.
Will the Appveyor automatically pull in the latest commit of the package, or will it try to find a released version to test?

Right now the appveyor.yml says

...
test_script:
  - C:\projects\julia\bin\julia -e "Pkg.add(\"FinEtools\"); Pkg.instantiate(); Pkg.test(\"FinEtools\")"

which I was hoping would look at the .toml files from my package, and install the appropriate packages. However, when Julia runs it fails to find the Arpack package. This package is listed in both .toml files as dependency.

By the way, has anyone figured out how to ask for a particular commit of the package to be tested? I can see in the source code for Pkg.add that it takes some keyword arguments, but I couldn’t ascertain what those were in order to request a particular release or a particular commit.


#2

I think you can do this for a certain commit

add FinEtools#cc9a8f1
#or one of these:
#add FinEtools#be9d32de027a1046d80d04d5c48ac7f310f6c521
#add FinEtools#master

However, it is not clear to me what the 0.7 equivalent of this is

C:\projects\julia\bin\julia -e "Pkg.add(\"FinEtools\");"

I understand Pkg. will not be supported anymore at some point

C:\projects\julia\bin\julia -e "\]add FinEtools;" #this does not work....

Specifically I would like to do ]st for informative purposes.

On appveyor I actually have another error which I do not know how to resolve (what is ‘Future’?). Notably, the travis build works just fine.


#3

pkg"add blah"?


#4

thanks. I could not find that in the Pkg doc (latest)


#5

This is now

julia -e 'import Pkg; Pkg.add("FinEtools")'

Pkg is not a standard library and needs to be imported before using it.

I understand Pkg. will not be supported anymore at some point

Do you mean the Pkg.whatever API calls? Those are mostly still supported and will continue to be. We’re working on fleshing it out to cover more of the whole range of functionality available from the REPL mode.


#6

Yes, I meant ‘Pkg.whatever API calls’.
I thought these would eventually disappear.

But innerlee answered my more important question which allows me to do pkg"st" which I cannot do through the Pkg.whatever API.


#7

I’m a bit confused. I changed your appveyor script so that it would work on 0.7, tests passed, and now you changed it back?

What you are doing now is that you are adding the registered version of FinETools, not the one from your branch.

Edit: Ah, the PR I made perhaps doesn’t work now due to the latest changes to code loading (as you can see, things are a bit back and forth). I made a PR to update your script again. Thanks for trying all the new stuff out and sorry that things are a bit chaotic.


#9

That’s probably what has been biting me lately.
It seems I’m changing my travis and appveyor scripts on a daily basis, trying to get them to work with Pkg3.
(Ever since v0.7.0-DEV.5183, things have not worked consistently on nightlies)


#10

Thank you very much. And no worries: by trying to keep up with 0.7 development I learn a lot, and I think it also helps the developers because sometimes I find where things got broken. It is all for a good cause :slight_smile:


#11

An addtion:
I had to remove the bit Pkg.develop(pwd()); on the nightly 0.7.0-alpha264.
Otherwise, things failed for me on Travis.

The error was ‘Cannot add package with the same name or uuid as the project’
without the Pkg.develop command, things are working though.