1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-31 16:22:23 +08:00

13 Commits

Author SHA1 Message Date
bb09ffd756 implement an HAMT for unixfs directory sharding
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2017-03-21 20:19:22 -07:00
f630222580 make: rework makefiles for non-recursive make and add sharness coverage
This commit introduces non-recursive Makefile infrastructure that replaces current Makefile infrastructure.
It also generally cleanups the Makefiles, separates them into nicer sub-modules and centralizes common operations into single definitions.

It allows to depend on any target that is defined in the makefile, this means that for example `gx install` is called once when `make build test_expensive_sharness` is called instead of 4 or 5 times.

It also makes the dependencies much cleaner and allows for reuse of modules. For example sharness coverage collection (WIP) uses sharness target with amended PATH, previously it might have been possible but not without wiring in the coverage collection into sharness make runner code.

Yes, it is more complex but not much more. There are few rules that have to be followed and few complexities added but IMHO it is worth it.

How to NR-make:
1. If make is to generate some file via a target, it MUST be defined in Rules.mk file in the directory of the target.
2. `Rules.mk` file MUST have `include mk/header.mk` statement as the first line and `include mk/footer.mk` statement as the last line (apart from project root `Rules.mk`).
3. It then MUST be included by the closest `Rules.mk` file up the directory tree.
4. Inside a `Rules.mk` special variable accessed as `$(d)` is defined. Its value is current directory, use it so if the `Rules.mk` file is moved in the tree it still works without a problem. Caution: this variable is not available in the recipe part and MUST NOT be used. Use name of the target or prerequisite to extract it if you need it.
5. Make has only one global scope, this means that name conflicts are a thing. Names SHOULD  follow `VAR_NAME_$(d)` convention. There are exceptions from this rule in form of well defined global variables. Examples: General lists `TGT_BIN`, `CLEAN`; General targets: `TEST`, `COVERAGE`; General variables: `GOFLAGS`, `DEPS_GO`.
3. Any rules, definitions or variables that fit some family SHOULD be defined in `mk/$family.mk` file and included from project root `Rules.mk`

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-02-12 01:18:40 +01:00
8ee4280f7b Switch unixfs.Metadata.MimeType to optional
*** THIS IS A BREAKING CHANGE *** as per [1]: "Required is forever"

Nevertheless this seems like a good idea at this time: there are no known
producers ( nor consumers ) of MetaData nodes, and the current requirement
of MimeType has an extremely narrow application scope.

This change could very well be rejected in lieu of implementing a new type
of node ( e.g. TheRealMetadata ) in the DataType enum.

Based on https://github.com/ipfs/go-ipfs/issues/3451#issuecomment-264246718

License: MIT
Signed-off-by: Mib Kd743naq <mib.kd743naq@gmail.com>

[1] https://developers.google.com/protocol-buffers/docs/proto#specifying-field-rules
2016-12-02 06:43:15 +01:00
171952b795 remove gogo-protobuf from godeps, use gx vendored
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 17:21:40 -08:00
5141fb0c8a fix import path of generated proto files
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-03 12:54:10 -07:00
d993bc04d6 implement symlinks in unixfs, first draft
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-30 13:33:42 -07:00
5fff7742f3 godeps: move (go)goprotobuf to github location 2015-04-28 13:42:22 +02:00
bf22aeec0a Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs
- Modified Godeps/Godeps.json by hand
- [TEST] Updated welcome docs hash to sharness
- [TEST] Updated contact doc
- [TEST] disabled breaking test (t0080-repo refs local)
2015-03-31 12:52:25 -07:00
bbcdeb74d2 fix: vendor 2015-02-04 15:32:49 -08:00
b79fffc965 implement metadata node for unixfs and other 2015-02-04 23:07:12 +00:00
a1b61f399c refactor(unixfs/pb) mv proto PBData -> Data, etc. 2014-10-22 21:52:59 -07:00
454d1df4aa fix(unixfs/pb) rename proto package -> unixfs_pb 2014-10-22 15:54:18 -07:00
75a860ca2b refactor(unixfs) move proto to pb package
not internal since io needs it

fix(fuse/ipns) use pb package

fix(fuse) import protos from unixfs/pb package
2014-10-22 15:54:17 -07:00