Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imag: init at 0.10.0 #77362

Open
wants to merge 1 commit into
base: master
from
Open

imag: init at 0.10.0 #77362

wants to merge 1 commit into from

Conversation

@filalex77
Copy link
Contributor

filalex77 commented Jan 9, 2020

Motivation for this change

https://imag-pim.org/blog/2019/12/24/imag-0-10-0/
https://github.com/matthiasbeyer/imag/releases/tag/v0.10.0

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This change is Reviewable

@filalex77 filalex77 force-pushed the filalex77:imag-0.10.0 branch from af70ed7 to 0ddfbd1 Jan 9, 2020
@filalex77

This comment has been minimized.

Copy link
Contributor Author

filalex77 commented Jan 9, 2020

@GrahamcOfBorg build imag

@matthiasbeyer

This comment has been minimized.

Copy link
Contributor

matthiasbeyer commented Jan 9, 2020

Cool! I didn't manage to do this, because I do not have a lockfile in the repository. Seems like your PR works though.

Awesome! Keep me posted!

@filalex77

This comment has been minimized.

Copy link
Contributor Author

filalex77 commented Jan 9, 2020

@matthiasbeyer Is it possible to check it in the upstream repository, by any chance?

@filalex77 filalex77 force-pushed the filalex77:imag-0.10.0 branch from 2ae67ac to f88df7e Jan 9, 2020
@matthiasbeyer

This comment has been minimized.

Copy link
Contributor

matthiasbeyer commented Jan 9, 2020

Possible yes, but I won't.

I won't because imag is in 0.x.y-state, which basically means that it can be used, but should not be considered final/stable/whatever. Adding a Cargo.lock file to the repository would result in that file changed for every other commit, which is just too much noise for me.
I will think about adding a Cargo.lock file to the repo for the 1.0.0 release, but not before that.

We could argue, though, that adding a Cargo.lock file for the release branches (so v0.10.x for the latest release right now), could be an option.

@filalex77

This comment has been minimized.

Copy link
Contributor Author

filalex77 commented Jan 9, 2020

@matthiasbeyer Sure, reasonable.


About the failing tests: do you know why? I'm more inclined to fix them than to just skip them.

@matthiasbeyer

This comment has been minimized.

Copy link
Contributor

matthiasbeyer commented Jan 9, 2020

About the failing tests: do you know why? I'm more inclined to fix them than to just skip them.

The code is here: https://git.imag-pim.org/imag/tree/bin/core/imag-link/src/lib.rs?h=v0.10.x#n525

It could be that the ofborg instance does not allow access to the filesystem in tests. That could be the problem, because the tests in /bin all require filesystem-access. That's wrong actually. I am a bit too tired right now to make such bold guesses 😄

Copy link
Member

yegortimoshenko left a comment

As you know, tests are currently failing, and as a result, derivation doesn't build:

running 6 tests
test tests::test_link_modificates ... ok
test tests::test_linking_links ... ok
test tests::test_linking_links_unlinking_removes_links ... FAILED
test tests::test_multilinking ... ok
test tests::test_linking_more_than_two ... ok
test tests::test_linking_and_unlinking_more_than_two ... FAILED

failures:

---- tests::test_linking_links_unlinking_removes_links stdout ----
thread 'tests::test_linking_links_unlinking_removes_links' panicked at 'assertion failed: `(left == right)`
  left: `Array([String("test2")])`,
 right: `Array([])`', bin/core/imag-link/src/lib.rs:520:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

---- tests::test_linking_and_unlinking_more_than_two stdout ----
thread 'tests::test_linking_and_unlinking_more_than_two' panicked at 'assertion failed: `(left == right)`
  left: `Array([String("test2"), String("test3")])`,
 right: `Array([])`', bin/core/imag-link/src/lib.rs:560:9


failures:
    tests::test_linking_and_unlinking_more_than_two
    tests::test_linking_links_unlinking_removes_links

If those tests are supposed to fail, consider skipping them.

@@ -19560,6 +19560,10 @@ in

iksemel = callPackage ../development/libraries/iksemel { };

imag = callPackage ../applications/office/imag {

This comment has been minimized.

Copy link
@yegortimoshenko

yegortimoshenko Feb 21, 2020

Member

Nitpick: most CLI todo and contact list managers I know of are in applications/misc. Maybe this does belong to applications/office better, I'm not sure.

This comment has been minimized.

Copy link
@matthiasbeyer

matthiasbeyer Feb 21, 2020

Contributor

I'm not sure either. It would certainly fit both, because its scope is PIM in general... I tend to prefer applications/misc though, as a "diary" for example is certainly not "office" 😄

@@ -0,0 +1,37 @@
{ stdenv
, lib

This comment has been minimized.

Copy link
@yegortimoshenko

yegortimoshenko Feb 21, 2020

Member

Nitpick: stdenv.lib is also available :)

};

buildInputs = [ openssl pkg-config ]
++ lib.optional stdenv.isDarwin Security;

This comment has been minimized.

Copy link
@yegortimoshenko

yegortimoshenko Feb 21, 2020

Member
Suggested change
++ lib.optional stdenv.isDarwin Security;
++ lib.optional stdenv.isDarwin Security;
sha256 = "1rkl4n3x2dk9x7705zsqjlxh92w7k6jkc27zqf18pwfl3fzz8f8p";
};

buildInputs = [ openssl pkg-config ]

This comment has been minimized.

Copy link
@yegortimoshenko

yegortimoshenko Feb 21, 2020

Member

pkg-config is a build-time dependency:

-  buildInputs = [ openssl pkg-config ]
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ openssl ]

https://nixos.org/nixpkgs/manual/#ssec-stdenv-dependencies


LIBCLANG_PATH = "${llvmPackages.libclang}/lib";

cargoPatches = [ ./cargo-lock.patch ];

This comment has been minimized.

Copy link
@yegortimoshenko

yegortimoshenko Feb 21, 2020

Member

@matthiasbeyer I understand the noise concern, and yet, consider:

If you’re building an end product, which are executable like command-line tool or an application, or a system library with crate-type of staticlib or cdylib, check Cargo.lock into git.

Currently, because lock file is not checked in, it's impossible to replicate the exact set of dependencies that you're developing imag with.

This comment has been minimized.

Copy link
@matthiasbeyer

matthiasbeyer Feb 21, 2020

Contributor

You mean me, not Matthew. Yes, I consider checking it in for the next release in the release branch (not in the master branch though).

A patch release is pending (not sure though when I want to release it), I could add the Cargo.lock to the patchset release!

This comment has been minimized.

Copy link
@yegortimoshenko

yegortimoshenko Feb 21, 2020

Member

So sorry for the typo!

@matthiasbeyer

This comment has been minimized.

Copy link
Contributor

matthiasbeyer commented Feb 21, 2020

FWIW, tests do not fail on imag CI, so this seems to be nix-related.

@filalex77 filalex77 force-pushed the filalex77:imag-0.10.0 branch from f88df7e to dfadb68 Feb 26, 2020
@filalex77 filalex77 requested a review from yegortimoshenko Feb 26, 2020
@filalex77

This comment has been minimized.

Copy link
Contributor Author

filalex77 commented Feb 26, 2020

Thanks a lot @yegortimoshenko!

@filalex77 filalex77 force-pushed the filalex77:imag-0.10.0 branch from dfadb68 to 15b784f Feb 26, 2020

checkPhase = ''
cargo test -- \
--skip test_linking

This comment has been minimized.

Copy link
@matthiasbeyer

matthiasbeyer Feb 27, 2020

Contributor

Would be nice to add a comment here, why this is skipped.

As said, in my CI this succeeds, so one might be curious why it is ignored here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.