The sound distributed version control system

#146 Windows newlines do not get persisted

Closed on December 5, 2020
boogerlad on November 30, 2020

I’m using pijul 1.0.0 alpha 10 with Debian on WSL.

pijul init something
cd something
#create a file on Windows named "fil"
pijul add fil
pijul diff

shows

message = ''
timestamp = '2020-11-30T19:40:01.945147900Z'
authors = []

# Changes

1. File addition: "fil" in "/" 777
  up 1.0, new 0:5
+ halo
+ newline
+ 2
\

as expected. But if I do the following after the above,

pijul record
pijul diff

shows

message = ''
timestamp = '2020-11-30T19:41:09.001166900Z'
authors = []

# Dependencies
[2] ZFT7GAYMEKKWV7I3ND7LRYV2YSJCF6U62WVDMTKUUWCZNLFEBA3QC

# Changes

1. Replacement in fil:1 2.6
B:BD 2.6 -> 2.7:20/2
  up 2.6, new 0:15, down 2.20
- halo
- newline
+ halo
+ newline

I haven’t edited fil at all. pijul diff is supposed to print nothing to stdout, and pijul record is supposed to print “Nothing to record” at this point. dos2unix fil shows the correct behavior, so that leads me to believe pijul stores files internally with unix newlines

contents of fil:

halo
newline
2
pmeunier on November 30, 2020

Pijul is supposed to store bytes, and doesn’t care at all about lines. I know where this is coming from: the text editor you used to record the change probably wrote \r\n, but then parsing the text changes removed the lines. I’ll try to fix it now.

pmeunier on November 30, 2020

Wait, your text editor could have removed the \r. Would you mind running RUST_LOG=libpijul::change=debug pijul rec, and pasting the output here (after saving the change in your text editor)?

pmeunier closed this discussion on November 30, 2020
pmeunier reopened this discussion on November 30, 2020
boogerlad on November 30, 2020

simplified file named “a”

a
b
c

first run

[2020-11-30T21:13:03Z DEBUG libpijul::change] make_change, contents_hash = "PNFZGNBMOLRXYO3VCPWVHQXV5FJDO5ZXTLSSHPCPRJZ2DVU4OQAAC"
[2020-11-30T21:13:08Z DEBUG libpijul::change] h = "message = \'first\'\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change] h = "timestamp = \'2020-11-30T21:13:03.745447500Z\'\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change] h = "\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change] h = "[[authors]]\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change] h = "name = \'boogerlad\'\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change] h = "\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change] h = "# Changes\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change] header = "message = \'first\'\ntimestamp = \'2020-11-30T21:13:03.745447500Z\'\n\n[[authors]]\nname = \'boogerlad\'\n\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change] h = "\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change] current = None
[2020-11-30T21:13:08Z DEBUG libpijul::change] h = "\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change] h = "1. File addition: \"a\" in \"/\" 777\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change] h = "  up 1.0, new 0:3\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change::text_changes] change_ref {} 1
[2020-11-30T21:13:08Z DEBUG libpijul::change] h = "+ a\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change::text_changes] parse_line_add ChangePosition(0) ChangePosition(5)
[2020-11-30T21:13:08Z DEBUG libpijul::change::text_changes] parse_line_add [43, 32, 97, 10]
[2020-11-30T21:13:08Z DEBUG libpijul::change::text_changes] contents_.len() = 7
[2020-11-30T21:13:08Z DEBUG libpijul::change] h = "+ b\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change::text_changes] parse_line_add ChangePosition(7) ChangePosition(5)
[2020-11-30T21:13:08Z DEBUG libpijul::change::text_changes] parse_line_add [43, 32, 98, 10]
[2020-11-30T21:13:08Z DEBUG libpijul::change::text_changes] contents_.len() = 9
[2020-11-30T21:13:08Z DEBUG libpijul::change] h = "+ c\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change::text_changes] parse_line_add ChangePosition(9) ChangePosition(5)
[2020-11-30T21:13:08Z DEBUG libpijul::change::text_changes] parse_line_add [43, 32, 99, 10]
[2020-11-30T21:13:08Z DEBUG libpijul::change::text_changes] contents_.len() = 11
[2020-11-30T21:13:08Z DEBUG libpijul::change] h = "\\\n"
[2020-11-30T21:13:08Z DEBUG libpijul::change] next action = FileAdd { add_name: NewVertex(NewVertex { up_context: [Position { change: Some("AA"), pos: ChangePosition(0) }], down_context: [], flag: BLOCK | FOLDER, start: ChangePosition(0), end: ChangePosition(3), inode: Position { change: Some("AA"), pos: ChangePosition(0) } }), add_inode: NewVertex(NewVertex { up_context: [Position { change: None, pos: ChangePosition(3) }], down_context: [], flag: BLOCK | FOLDER, start: ChangePosition(4), end: ChangePosition(4), inode: Position { change: Some("AA"), pos: ChangePosition(0) } }), contents: Some(NewVertex(NewVertex { up_context: [Position { change: None, pos: ChangePosition(4) }], down_context: [], flag: (empty), start: ChangePosition(5), end: ChangePosition(10), inode: Position { change: None, pos: ChangePosition(4) } })), path: "a" }
[2020-11-30T21:13:08Z DEBUG libpijul::change] "IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"
[2020-11-30T21:13:08Z DEBUG libpijul::changestore::filesystem] file_name = "/mnt/c/Users/Administrator/Desktop/test/.pijul/changes/IH/5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC.change"
Hash: IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC

second run

[2020-11-30T21:13:35Z DEBUG libpijul::change] read_contents 0 3
[2020-11-30T21:13:35Z DEBUG libpijul::change] read_contents 0 3
[2020-11-30T21:13:35Z DEBUG libpijul::change] read_contents 5 5
[2020-11-30T21:13:35Z DEBUG libpijul::change] h = "IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"
[2020-11-30T21:13:35Z DEBUG libpijul::change] id = ChangeId(IH5GNJHLHG5GQ)
[2020-11-30T21:13:35Z DEBUG libpijul::change] time = 0
[2020-11-30T21:13:35Z DEBUG libpijul::change] make_change, contents_hash = "UATB7UB27IWXJ6CQQB5TVSPV3LN5BVHQS3LTECRUPRSOULGMNBYAC"
[2020-11-30T21:13:35Z DEBUG libpijul::change] read_contents 5 4
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "message = \'this again?\'\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "timestamp = \'2020-11-30T21:13:35.812884900Z\'\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "[[authors]]\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "name = \'boogerlad\'\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "# Dependencies\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change] header = "message = \'this again?\'\ntimestamp = \'2020-11-30T21:13:35.812884900Z\'\n\n[[authors]]\nname = \'boogerlad\'\n\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "[2] IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "# Changes\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change] current = None
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "1. Replacement in a:1 2.4\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] change_ref {2: "IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"} 2
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "B:BD 2.4 -> 2.5:9/2\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] parse_edges "B:BD 2.4 -> 2.5:9/2\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] parse edge "B:BD 2.4 -> 2.5:9/2\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] change_ref {2: "IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"} 2
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] change_ref {2: "IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"} 2
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] change_ref {2: "IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"} 2
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "  up 2.4, new 0:6, down 2.9\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change] cap = Captures({0: Some("up 2.4, new 0:6, down 2.9"), 1: Some("2.4"), 2: None, 3: Some(", new 0:6"), 4: Some("0"), 5: Some("6"), 6: Some(", down 2.9"), 7: Some("2.9"), 8: None})
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] change_ref {2: "IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"} 2
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] change_ref {2: "IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"} 2
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "- a\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] parse_edges "- a\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] parse edge "- a\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] not parsed
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "- b\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] parse_edges "- b\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] parse edge "- b\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] not parsed
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "+ a\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] parse_line_add ChangePosition(0) ChangePosition(0)
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] parse_line_add [43, 32, 97, 10]
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] contents_.len() = 2
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "+ b\n"
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] parse_line_add ChangePosition(2) ChangePosition(0)
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] parse_line_add [43, 32, 98, 10]
[2020-11-30T21:13:41Z DEBUG libpijul::change::text_changes] contents_.len() = 4
[2020-11-30T21:13:41Z DEBUG libpijul::change] next action = Replacement { change: EdgeMap(EdgeMap { edges: [NewEdge { previous: BLOCK, flag: BLOCK | DELETED, from: Position { change: Some("IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"), pos: ChangePosition(4) }, to: Vertex { change: Some("IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"), start: ChangePosition(5), end: ChangePosition(9) }, introduced_by: Some("IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC") }], inode: Position { change: Some("IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"), pos: ChangePosition(4) } }), replacement: NewVertex(NewVertex { up_context: [Position { change: Some("IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"), pos: ChangePosition(4) }], down_context: [Position { change: Some("IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"), pos: ChangePosition(9) }], flag: (empty), start: ChangePosition(0), end: ChangePosition(4), inode: Position { change: Some("IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"), pos: ChangePosition(4) } }), local: Local { path: "a", line: 1 } }
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"
[2020-11-30T21:13:41Z DEBUG libpijul::change] id = ChangeId(IH5GNJHLHG5GQ)
[2020-11-30T21:13:41Z DEBUG libpijul::change] time = 0
[2020-11-30T21:13:41Z DEBUG libpijul::change] h = "IH5GNJHLHG5GQ5RHDHGUWZN5V5CRT3IOHG747YYP3VVN7SUXSAMAC"
[2020-11-30T21:13:41Z DEBUG libpijul::change] id = ChangeId(IH5GNJHLHG5GQ)
[2020-11-30T21:13:41Z DEBUG libpijul::change] time = 0
[2020-11-30T21:13:41Z DEBUG libpijul::change] "WGW42TOKSUMCG6TZNOO6GQZCINEITGL67LTSYOAMN5ZPZNTD66EQC"
[2020-11-30T21:13:41Z DEBUG libpijul::changestore::filesystem] file_name = "/mnt/c/Users/Administrator/Desktop/test/.pijul/changes/WG/W42TOKSUMCG6TZNOO6GQZCINEITGL67LTSYOAMN5ZPZNTD66EQC.change"
Hash: WGW42TOKSUMCG6TZNOO6GQZCINEITGL67LTSYOAMN5ZPZNTD66EQC

I noticed that if I clone the repository, the resulting file is missing \r as well

boogerlad on November 30, 2020

I’m pretty certain that it’s not the text editor stripping out the \r. cat -e /tmp/.tmpjGNVCm doesn’t show any ^M$ (temporary file from pijul record)

pmeunier on December 1, 2020

That’s very helpful, thanks. I know exactly what it is.

pmeunier added a change on December 4, 2020
OXMYGLW2563T6VA75532P7N7CZBHVJL4VI5CQBJ6X4MOX4RKL4GAC
main
pmeunier on December 4, 2020

Hi! Does it work better with this change? If you can’t pull and recompile, just tell me and I’ll publish a new version.

boogerlad on December 4, 2020

Sadly, I can’t pull and recompile. It get stuck at change 101/125 https://i.imgur.com/qH8mEQU.png Can you publish a new version and then I’ll test again?

pmeunier on December 5, 2020

That problem is supposed to be fixed in 1.0.0-alpha.16, is this the version you have?

boogerlad on December 5, 2020

I’ve just upgraded to 1.0.0-alpha.17, which resolves the cloning issue. However, now I’m unable to compile :(

   Compiling hyper v0.13.9
error: expected expression, found `>>`
  --> libpijul/src/pristine/change_id.rs:30:1
   |
30 | >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   | ^^ expected expression

error: non-item in item list
   --> libpijul/src/pristine/sanakirja.rs:640:1
    |
318 | impl TxnT for GenericTxn {
    |                                                          - item list starts here
...
640 | >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    | ^^ non-item starts here
...
756 | }
    | - item list ends here

error[E0432]: unresolved import `filesystem::FileSystem`
 --> libpijul/src/working_copy/mod.rs:7:9
  |
7 | pub use filesystem::FileSystem;
  |         ^^^^^^^^^^^^^^^^^^^^^^ no `FileSystem` in `working_copy::filesystem`

error[E0425]: cannot find function `undo_file_addition` in module `working_copy`
   --> libpijul/src/unrecord/mod.rs:230:23
    |
230 |         working_copy::undo_file_addition(txn, change_id, new_vertex)?;
    |                       ^^^^^^^^^^^^^^^^^^ not found in `working_copy`

error[E0425]: cannot find function `undo_file_deletion` in module `working_copy`
   --> libpijul/src/unrecord/mod.rs:327:27
    |
327 |             working_copy::undo_file_deletion(txn, changes, channel, change_id, newedges)?
    |                           ^^^^^^^^^^^^^^^^^^ not found in `working_copy`

error[E0425]: cannot find function `undo_file_reinsertion` in module `working_copy`
   --> libpijul/src/unrecord/mod.rs:329:27
    |
329 |             working_copy::undo_file_reinsertion(txn, change_id, newedges)?
    |                           ^^^^^^^^^^^^^^^^^^^^^ not found in `working_copy`

error[E0046]: not all trait items implemented, missing: `iter_partials`, `iter_revdep`, `iter_dep`, `iter_touched`, `iter_rev_touched`, `Remote`, `Revremote`, `Remotestates`, `RemoteCursor`, `cursor_remote_next`, `cursor_remote_prev`, `cursor_remote`, `rev_cursor_remote`, `iter_remote`, `iter_rev_remote`, `get_remote`, `last_remote`, `get_remote_state`, `remote_has_change`, `remote_has_state`, `channel_has_state`, `iter_revinodes`
   --> libpijul/src/pristine/sanakirja.rs:318:1
    |
318 |   impl TxnT for GenericTxn {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `iter_partials`, `iter_revdep`, `iter_dep`, `iter_touched`, `iter_rev_touched`, `Remote`, `Revremote`, `Remotestates`, `RemoteCursor`, `cursor_remote_next`, `cursor_remote_prev`, `cursor_remote`, `rev_cursor_remote`, `iter_remote`, `iter_rev_remote`, `get_remote`, `last_remote`, `get_remote_state`, `remote_has_change`, `remote_has_state`, `channel_has_state`, `iter_revinodes` in implementation
    |
   ::: libpijul/src/pristine/mod.rs:151:5
    |
151 | /     fn iter_partials<'txn>(
152 | |         &'txn self,
153 | |         channel: &str,
154 | |     ) -> Cursor>;
    | |_________________________________________________________________________________________- `iter_partials` from trait
...
204 |       fn iter_revdep(&self, p: ChangeId) -> Cursor;
    |       ----------------------------------------------------------------------------------------------- `iter_revdep` from trait
205 |
206 |       fn iter_dep(&self, p: ChangeId) -> Cursor;
    |       -------------------------------------------------------------------------------------------- `iter_dep` from trait
...
213 | /     fn iter_touched(
214 | |         &self,
215 | |         p: Position,
216 | |     ) -> Cursor, ChangeId>;
    | |______________________________________________________________________________________- `iter_touched` from trait
217 |
218 | /     fn iter_rev_touched(
219 | |         &self,
220 | |         p: ChangeId,
221 | |     ) -> Cursor>;
    | |__________________________________________________________________________________________- `iter_rev_touched` from trait
...
226 |       table!(remote);
    |       --------------- `Remote` from trait
227 |       table!(revremote);
    |       ------------------ `Revremote` from trait
228 |       table!(remotestates);
    |       --------------------- `Remotestates` from trait
229 |       cursor!(remote, u64, (Hash, Merkle));
    |       -------------------------------------
    |       |
    |       `RemoteCursor` from trait
    |       `cursor_remote_next` from trait
    |       `cursor_remote_prev` from trait
    |       `cursor_remote` from trait
230 |       rev_cursor!(remote, u64, (Hash, Merkle));
    |       ----------------------------------------- `rev_cursor_remote` from trait
231 |
232 | /     fn iter_remote<'txn>(
233 | |         &'txn self,
234 | |         remote: &Self::Remote,
235 | |         k: u64,
236 | |     ) -> Cursor;
    | |___________________________________________________________________________- `iter_remote` from trait
237 |
238 | /     fn iter_rev_remote<'txn>(
239 | |         &'txn self,
240 | |         remote: &Self::Remote,
241 | |         k: Option,
242 | |     ) -> RevCursor;
    | |______________________________________________________________________________- `iter_rev_remote` from trait
243 |
244 |       fn get_remote(&mut self, name: &str) -> Option>;
    |       ---------------------------------------------------------------- `get_remote` from trait
245 |
246 |       fn last_remote(&self, remote: &Self::Remote) -> Option<(u64, (Hash, Merkle))>;
    |       ------------------------------------------------------------------------------ `last_remote` from trait
247 |
248 |       fn get_remote_state(&self, remote: &Self::Remote, n: u64) -> Option<(u64, (Hash, Merkle))>;
    |       ------------------------------------------------------------------------------------------- `get_remote_state` from trait
249 |
250 |       fn remote_has_change(&self, remote: &RemoteRef, hash: Hash) -> bool;
    |       -------------------------------------------------------------------------- `remote_has_change` from trait
251 |       fn remote_has_state(&self, remote: &RemoteRef, hash: Merkle) -> bool;
    |       --------------------------------------------------------------------------- `remote_has_state` from trait
252 |       fn channel_has_state(&self, channel: &ChannelRef, hash: Merkle) -> bool;
    |       ------------------------------------------------------------------------------ `channel_has_state` from trait
...
260 | /     fn iter_revinodes(
261 | |         &self,
262 | |     ) -> Cursor, Inode>;
    | |_______________________________________________________________________________- `iter_revinodes` from trait

error[E0599]: no method named `delete` found for mutable reference `&mut record::Builder` in the current scope
   --> libpijul/src/diff/mod.rs:102:22
    |
102 |                 self.delete(
    |                      ^^^^^^ method not found in `&mut record::Builder`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `delete`, perhaps you need to implement it:
            candidate #1: `diffs::Diff`

   Compiling hyper-tls v0.4.3
   Compiling reqwest v0.10.9
error[E0283]: type annotations needed
    --> libpijul/src/pristine/sanakirja.rs:1104:46
     |
1104 | ...                   remote: self.txn.create_db()?,
     |                                        ^^^^^^^^^ cannot infer type for type parameter `K` declared on the associated function `create_db`
     |
     = note: cannot satisfy `_: sanakirja::Representable`
help: consider specifying the type arguments in the method call
     |
1104 |                             remote: self.txn.create_db::()?,
     |                                                       ^^^^^^^^

error: aborting due to 9 previous errors

Some errors have detailed explanations: E0046, E0283, E0425, E0432, E0599.
For more information about an error, try `rustc --explain E0046`.
error: could not compile `libpijul`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

There’s definitely a lot broken on WSL, since after cloning, libpijul/src/pristine/change_id.rs has a bunch of >>>, ===, <<< symbols and pijul diff immediately shows there is a diff which shouldn’t happen… I tested on a VM with guix, and I’m able to clone and compile no problem without mutated files.

boogerlad on December 5, 2020

Okay, I tared the source code from guix to transfer it to WSL. It compiled with no issues. I can confirm this issue is resolved. I’ll open another discussion about the other WSL issues. Here’s proof:

# pijul init
# pijul add d.txt
# pijul record
Hash: T2SQM6K5KIOVF4HNH6WJ6VHTDMEIJCGVH4SU4HS3EACYRSE742AAC
# pijul diff
message = ''
timestamp = '2020-12-05T17:44:15.066893500Z'
authors = []

# Dependencies
[2] T2SQM6K5KIOVF4HNH6WJ6VHTDMEIJCGVH4SU4HS3EACYRSE742AAC

# Changes

1. Replacement in d.txt:1 2.8
B:BD 2.8 -> 2.9:13/2
  up 2.8, new 0:6, down 2.13
- d
- d
+ d
+ d
# rm -rf .pijul
# pijul init
# pijul add d.txt
# pijul record -m "this works"
Hash: C3GZFOTK7OMTPPJNVLCMBTQ2WQ3XQ7RPAKTQM6O4UAD4JK46YR5QC
# pijul diff
#

Seems making any change with nano (setting the message, for example) will destroy the carriage returns

boogerlad closed this discussion on December 5, 2020