Hi,

I'm returning to Julia after a long break (a year?) and am trying to get 
some old code I had lying around compiling.

When I try to run tests for https://github.com/andrewcooke/IntModN.jl (at 
4bc2734b80a15108ff66fd61705681e9d50a94c1) I see the error:

andrew@laptop:~/project/IntModN> julia -e 'Pkg.test("IntModN")'
INFO: Computing test dependencies for IntModN...
INFO: Installing Polynomial v0.1.1
INFO: Testing IntModN
ERROR: LoadError: error compiling tests: error compiling tests_p2: error 
compiling test_p2_show: error compiling print_to_string: error compiling 
_convert: error compiling fill!: box: argument not of a primitive type
 in include at ./boot.jl:252
 in include_from_node1 at loading.jl:134
 in process_options at ./client.jl:310
 in _start at ./client.jl:409
while loading /home/andrew/.julia/v0.4/IntModN/test/runtests.jl, in 
expression starting on line 5

which seems to be triggered by the code at 
https://github.com/andrewcooke/IntModN.jl/blob/d138efabf7112bdb961e66b281dea40838e06f4f/src/IntModN.jl#L533
 
:

function _convert{T, F}(::Type{T}, from::F)
    result, mask = zero(T), one(T)
    for _ in 1:length(from)
        if from & one(F) != zero(F)
            result += mask
        end
        from >>>= 1
        mask <<= 1
    end
    result
end

which is (as far as I can tell / remember) just converting from one 
representation of a polynomial in GF2 to another (from a bit pattern to an 
explicit polynomial).

I am pretty sure this code worked just fine.  Has something changed in 
Julia?  Is this a bug?  Should I be using a stable version of Julia these 
days rather than git?

Any guidance appreciated.  It seems like a low-level error (I don't 
remember having to care about boxing!) and I can't find much info googling.

Thanks,
Andrew

Reply via email to