@@ -1784,18 +1784,205 @@ fn publish_with_feature_point_diff_kinds_dep() {
1784
1784
p. cargo ( "publish --no-verify" )
1785
1785
. env ( "RUSTFLAGS" , "--cfg unix" )
1786
1786
. replace_crates_io ( registry. index_url ( ) )
1787
- . with_status ( 101 )
1788
1787
. with_stderr (
1789
1788
"\
1790
1789
[UPDATING] [..]
1791
1790
[PACKAGING] foo v0.1.0 [..]
1792
- [ERROR] failed to prepare local package [..]
1793
-
1794
- Caused by:
1795
- feature `foo_feature` includes `target-dev-only/cat`, but `target-dev-only` is not a dependency
1791
+ [UPDATING] [..]
1792
+ [PACKAGED] [..] files, [..] ([..] compressed)
1793
+ [UPLOADING] foo v0.1.0 [..]
1794
+ [UPLOADED] foo v0.1.0 [..]
1795
+ [NOTE] waiting [..]
1796
+ You may press ctrl-c [..]
1797
+ [PUBLISHED] foo v0.1.0 [..]
1796
1798
" ,
1797
1799
)
1798
1800
. run ( ) ;
1801
+
1802
+ publish:: validate_upload_with_contents (
1803
+ r#"
1804
+ {
1805
+ "authors": [],
1806
+ "badges": {},
1807
+ "categories": [],
1808
+ "deps": [
1809
+ {
1810
+ "default_features": true,
1811
+ "features": [
1812
+ "cat"
1813
+ ],
1814
+ "kind": "normal",
1815
+ "name": "normal-and-dev",
1816
+ "optional": false,
1817
+ "target": null,
1818
+ "version_req": "^1.0"
1819
+ },
1820
+ {
1821
+ "default_features": true,
1822
+ "features": [
1823
+ "cat"
1824
+ ],
1825
+ "kind": "normal",
1826
+ "name": "normal-only",
1827
+ "optional": false,
1828
+ "target": null,
1829
+ "version_req": "^1.0"
1830
+ },
1831
+ {
1832
+ "default_features": true,
1833
+ "features": [
1834
+ "cat"
1835
+ ],
1836
+ "kind": "dev",
1837
+ "name": "normal-and-dev",
1838
+ "optional": false,
1839
+ "target": null,
1840
+ "version_req": "^1.0"
1841
+ },
1842
+ {
1843
+ "default_features": true,
1844
+ "features": [
1845
+ "cat"
1846
+ ],
1847
+ "kind": "build",
1848
+ "name": "build-only",
1849
+ "optional": false,
1850
+ "target": null,
1851
+ "version_req": "^1.0"
1852
+ },
1853
+ {
1854
+ "default_features": true,
1855
+ "features": [
1856
+ "cat"
1857
+ ],
1858
+ "kind": "normal",
1859
+ "name": "target-normal-and-dev",
1860
+ "optional": false,
1861
+ "target": "cfg(unix)",
1862
+ "version_req": "^1.0"
1863
+ },
1864
+ {
1865
+ "default_features": true,
1866
+ "features": [
1867
+ "cat"
1868
+ ],
1869
+ "kind": "normal",
1870
+ "name": "target-normal-only",
1871
+ "optional": false,
1872
+ "target": "cfg(unix)",
1873
+ "version_req": "^1.0"
1874
+ },
1875
+ {
1876
+ "default_features": true,
1877
+ "features": [
1878
+ "cat"
1879
+ ],
1880
+ "kind": "build",
1881
+ "name": "target-build-only",
1882
+ "optional": false,
1883
+ "target": "cfg(unix)",
1884
+ "version_req": "^1.0"
1885
+ },
1886
+ {
1887
+ "default_features": true,
1888
+ "features": [
1889
+ "cat"
1890
+ ],
1891
+ "kind": "dev",
1892
+ "name": "target-normal-and-dev",
1893
+ "optional": false,
1894
+ "target": "cfg(unix)",
1895
+ "version_req": "^1.0"
1896
+ }
1897
+ ],
1898
+ "description": "foo",
1899
+ "documentation": "foo",
1900
+ "features": {
1901
+ "foo_feature": [
1902
+ "normal-only/cat",
1903
+ "build-only/cat",
1904
+ "normal-and-dev/cat",
1905
+ "target-normal-only/cat",
1906
+ "target-build-only/cat",
1907
+ "target-normal-and-dev/cat"
1908
+ ]
1909
+ },
1910
+ "homepage": "foo",
1911
+ "keywords": [],
1912
+ "license": "MIT",
1913
+ "license_file": null,
1914
+ "links": null,
1915
+ "name": "foo",
1916
+ "readme": null,
1917
+ "readme_file": null,
1918
+ "repository": "foo",
1919
+ "rust_version": null,
1920
+ "vers": "0.1.0"
1921
+ }
1922
+ "# ,
1923
+ "foo-0.1.0.crate" ,
1924
+ & [ "Cargo.lock" , "Cargo.toml" , "Cargo.toml.orig" , "src/main.rs" ] ,
1925
+ & [ (
1926
+ "Cargo.toml" ,
1927
+ & format ! (
1928
+ r#"{}
1929
+ [package]
1930
+ edition = "2015"
1931
+ name = "foo"
1932
+ version = "0.1.0"
1933
+ authors = []
1934
+ description = "foo"
1935
+ homepage = "foo"
1936
+ documentation = "foo"
1937
+ license = "MIT"
1938
+ repository = "foo"
1939
+
1940
+ [dependencies.normal-and-dev]
1941
+ version = "1.0"
1942
+ features = ["cat"]
1943
+
1944
+ [dependencies.normal-only]
1945
+ version = "1.0"
1946
+ features = ["cat"]
1947
+
1948
+ [dev-dependencies.normal-and-dev]
1949
+ version = "1.0"
1950
+ features = ["cat"]
1951
+
1952
+ [build-dependencies.build-only]
1953
+ version = "1.0"
1954
+ features = ["cat"]
1955
+
1956
+ [features]
1957
+ foo_feature = [
1958
+ "normal-only/cat",
1959
+ "build-only/cat",
1960
+ "normal-and-dev/cat",
1961
+ "target-normal-only/cat",
1962
+ "target-build-only/cat",
1963
+ "target-normal-and-dev/cat",
1964
+ ]
1965
+
1966
+ [target."cfg(unix)".dependencies.target-normal-and-dev]
1967
+ version = "1.0"
1968
+ features = ["cat"]
1969
+
1970
+ [target."cfg(unix)".dependencies.target-normal-only]
1971
+ version = "1.0"
1972
+ features = ["cat"]
1973
+
1974
+ [target."cfg(unix)".build-dependencies.target-build-only]
1975
+ version = "1.0"
1976
+ features = ["cat"]
1977
+
1978
+ [target."cfg(unix)".dev-dependencies.target-normal-and-dev]
1979
+ version = "1.0"
1980
+ features = ["cat"]
1981
+ "# ,
1982
+ cargo:: core:: package:: MANIFEST_PREAMBLE
1983
+ ) ,
1984
+ ) ] ,
1985
+ ) ;
1799
1986
}
1800
1987
#[ cargo_test]
1801
1988
fn credentials_ambiguous_filename ( ) {
0 commit comments